def PsimFileSave(self, SchematicObj, New_SchematicFilePath):
if not self.IsValid():
print("PSIM object was not loaded.")
return 0;
schHandle = 0
if isinstance(SchematicObj, PSIM_schematic):
schHandle = SchematicObj.value
SaveSchematicFile = getattr(self.psimHandle, "SaveSchematicFileW")
if not SaveSchematicFile:
raise AttributeError(self.VersionErrorMessage)
SaveSchematicFile.restype = ctypes.c_int
res = SaveSchematicFile(schHandle, ctypes.c_wchar_p(New_SchematicFilePath), ctypes.c_int (0));
if res == 0 :
print("Unable to save schematic file " + New_SchematicFilePath)
return 0;
return res