cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How can you export object in the current repository to a mgl or mgr file

alao
New Contributor

Is there a way to export a MegaCollection of object into an export file progrmatically like what is done with the MegaCompareTool?

 

I would ust this but we don't need to compare just create export files based on a collection of objects.

1 Reply

alao
New Contributor

After poking around here is what I was able to come up with.


public ETLManager(MegaCollection initiatives) { MegaExportTool tool = new MegaExportTool(initiatives.getRoot()); String filename = new SimpleDateFormat("'initiative-'yyyyMMddHHmmss'.mgl'").format(new Date()); String folder = AppConfig.getConfig("InitiativeExportsDirectory"); String location = String.format("%s\\%s", folder, filename); tool.perimeter(ECOMAP_DATA_TRANSFER); tool.propagate(true); tool.transferedObject(false); tool.Export(initiatives, location); //ExportManager.createExport(initiatives, filename, folder, "Development", ECOMAP_DATA_TRANSFER); }