Hi,
Am using the following code to import an ".export" file type for IO_Module using scripts but getting the error "Object GUID is not valid".
----CODE---- import sys, io
system.trace = True
class Handler(NativeImportHandler): def conflict(self, name, obj, guid): print("Object already exists: ",name) return NativeImportResolve.skip
def progress(self, name, obj, exception): print("in progess: ", name)
def skipped(self, list): for obj in list: print("Skipped: ", obj.get_name())
def importFilter(name, guid,type,path): return True;
handler = Handler() projects.primary.import_native(r"C:\Users\BANNERJEE\Desktop\S300.export", importFilter, handler)
S300.zip [15.88 KiB]
Were you able to get this to work. I'm interested in doing this for a current project. Would appreciate any input you might have.
Thx
Log in to post a comment.
Hi,
Am using the following code to import an ".export" file type for IO_Module using scripts but getting the error "Object GUID is not valid".
----CODE----
import sys, io
system.trace = True
class Handler(NativeImportHandler):
def conflict(self, name, obj, guid):
print("Object already exists: ",name)
return NativeImportResolve.skip
def progress(self, name, obj, exception):
print("in progess: ", name)
def skipped(self, list):
for obj in list:
print("Skipped: ", obj.get_name())
def importFilter(name, guid,type,path):
return True;
handler = Handler()
projects.primary.import_native(r"C:\Users\BANNERJEE\Desktop\S300.export", importFilter, handler)
S300.zip [15.88 KiB]
Were you able to get this to work. I'm interested in doing this for a current project. Would appreciate any input you might have.
Thx