Hi! Im starting to use the script editor en mega and i found out how to export objects using this code:
Set oBP=GetCollection("Software technology")
oBP.CallMethod("~Bav0cNnAjyQR[Standard for export]").SaveAs "C:\Desktop\MegaExport.xml","CommandFormat=XML"
and i have been searching and reading the import documentation but i dont understando how to import a file that contains objects to mega.
Is there a simple code like the one above for importing?
Solved! Go to Solution.
In the above example, MyDb is a MegaDatabase object that you can get in a Administration script from the collection MegaDatabases on a MegaEnvironmentObject
If you want to run the import from the script editor in a private workspace, the context is different because the repository is implicitely the current repository
In this situation:
Code example (VB script)
Set oRoot = GetRoot() oRoot.MegaImport "C:\tmp\import.mgr","C:\tmp\rejects_import.mgr"