9 Feb 2021

Use multiple app bundles

Though some articles, like Run additional programs inside a WorkItem, already showed that you can use multiple app bundles in an activity, there wasn't a blog post yet dedicated to this topic. 

Two main reasons I can think of for using multiple app bundles:

a) Componentization

Instead of having a single app bundle that does everything, you might want to break it into separate ones
Let's say you have an app bundle that (1) updates assembly parameters, (2) generates drawing and (3) exports to PDF - it could be split into 3 app bundles.
Pros: this way you can mix and match existing app bundles to create new activities 
Cons: there will be a bit of overhead when running the work items. It's because InventorCoreConsole.exe (I think it's the same for Revit) can only load a single app bundle at a time. So in the case of the above example, the activity would have to start InventorCoreConsole.exe 3 times and open the necessary input documents - something like this:

"commandLine" : [
  "$(engine.path)\\InventorCoreConsole.exe /al $(appbundles[UpdateParameters].path)",
  "$(engine.path)\\InventorCoreConsole.exe /al $(appbundles[CreateDrawing].path)",
  "$(engine.path)\\InventorCoreConsole.exe /al $(appbundles[CreatePDF].path)"
]

b) Spread resources

As mentioned in Optimize Design Automation process, you can speed up processing time by including input files that are always needed by the given activity (e.g. template files) directly in the app bundle. However, there is a limitation on the size of an app bundle which might force you to split them into separate ones - see Design Automation Rate Limit and Quotas. Even if you do not run into that limit, it could make sense to organize your resources into multiple app bundles.
 

 

 

Related Article