I'm using the import_native method to import some files in native export format, by calling it on the project root object.
Even though the files do have some project folder structure in them, import does not use them at all.
Is there any way to make the import_native() method to behave like the import_xml() function concerning folders in the project view?
EDIT:
May this be part of the solution?
l viewtopic.php?f=18&t=1890&start=30#p4358 l
Do i just need to add something to the native export in order to cover the folder structure of that element?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2015-12-03
Originally created by: M.Schaber
Hi,
I just tested it locally, and it worked as expected. (I attached the export file as a zip archive .)
\# create the import reporterclassHandler(NativeImportHandler):  defconflict(self,name,obj,guid):    print("Object already exists: ",name)    returnNativeImportResolve.skip  defprogress(self,name,obj,exception):    print("in progess: ",name)  defskipped(self,list):    forobjinlist:      print("Skipped: ",obj.get_name())defimportFilter(name,guid,type,path):        returnTrue;handler=Handler()    projects.primary.import_native("D:\\cdsproj\\misc\\untitled4.export",importFilter,handler)
The export file was generated by exporting via the UI.
Could you provide an export file which does not work as expected, and the STR how you generated it?
M.Schaber hat geschrieben:
Hi,
I just tested it locally, and it worked as expected. (I attached the export file as a zip archive Untitled4.zip.)
\# create the import reporterclassHandler(NativeImportHandler):  defconflict(self,name,obj,guid):    print("Object already exists: ",name)    returnNativeImportResolve.skip  defprogress(self,name,obj,exception):    print("in progess: ",name)  defskipped(self,list):    forobjinlist:      print("Skipped: ",obj.get_name())defimportFilter(name,guid,type,path):        returnTrue;handler=Handler()    projects.primary.import_native("D:\\cdsproj\\misc\\untitled4.export",importFilter,handler)
The export file was generated by exporting via the UI.
Could you provide an export file which does not work as expected, and the STR how you generated it?
While importing am getting the following error, using above method:
(The object GUID '58addc41-f68b-4b7e-82a0-783ded3a2546' is not valid)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm using the import_native method to import some files in native export format, by calling it on the project root object.
Even though the files do have some project folder structure in them, import does not use them at all.
Is there any way to make the import_native() method to behave like the import_xml() function concerning folders in the project view?
EDIT:
May this be part of the solution?
l viewtopic.php?f=18&t=1890&start=30#p4358 l
Do i just need to add something to the native export in order to cover the folder structure of that element?
Originally created by: M.Schaber
Hi,
I just tested it locally, and it worked as expected. (I attached the export file as a zip archive .)
The export file was generated by exporting via the UI.
Could you provide an export file which does not work as expected, and the STR how you generated it?
Untitled4.zip [2.2 KiB]
The export file was generated by exporting via the UI.
Could you provide an export file which does not work as expected, and the STR how you generated it?
While importing am getting the following error, using above method:
(The object GUID '58addc41-f68b-4b7e-82a0-783ded3a2546' is not valid)