def close(gdoc): SWCADGui.runCommand("Std_CloseActiveWindow") gdoc2 = SWCAD.ActiveDocument() if gdoc == gdoc2: SWCAD.closeDocument(gdoc.Name)
def save(gdoc): SWCADGui.runCommand("Std_Save") print(gdoc) gdoc.Label = os.path.splitext(os.path.basename( gdoc.FileName))[0] or gdoc.Label
def save(gdoc): SWCADGui.runCommand("Std_Save") print(gdoc) gdoc.Label = os.path.splitext(os.path.basename(gdoc.FileName))[0] or gdoc.Label