Reputation: 2373
Ok I think we have a DA for Revit app running in Forge, but the next question is how to support multiple Revit version and I can't find a ton of documentation on it. Here is what I understand (or think I do anyway) and the questions I have:
Each app bundle and activity can only define one engine so it seems like you would need to create a bundle for each supported Revit version as well as a related activity for each Revit version. Questions on this:
App bundles are referenced by their ID. Most of the examples show the ID as something like 'DeleteWallsApp' or whatever. However, if you truly need multiple app bundles for multiple Revit versions then would you actually want to use ID's like 'DeleteWallsApp2018' and 'DeleteWallsApp2020', etc.? You couldn't have multiple ID's that are the same so that seems the most pertinent way to do it. Is this correct?
Bundles and activities are also referenced by their alias. If I understand they are meant for dev/staging/production aliases for testing vs. production code, etc. If so, is it recommended then to have those aliases for each bundle?
This seems like a lot of stuff to upload to a lot of different places but I guess it's not too bad if you automate the system. I just want to make sure I'm not missing some part of the structure.
Upvotes: 4
Views: 403
Reputation: 31
The Design Automation engines do not support having dlls and other resources for multiple versions in the same app bundle - you cannot rely on the PackageContents.xml file to specify which files should be used by which engine version.
The best feature of the App Bundle is ignore in Design Automation...
if you need to use different dlls and other resources for different engine versions, then you should create a separate app bundle (or app bundle version) for each engine version that you want to support, and a separate activity (or activity version) that is referencing the correct app bundle version
Please make PackageContents.xml works in Design Automation, so I can create only one bundle instead of one for each version...
Source: https://aps.autodesk.com/blog/support-multiple-engine-versions
Upvotes: 0
Reputation: 4451
The activity can override the engine version specified by the appbundle. Like your desktop addins, an appbundle
built on Revit 2018 will work on Revit 2019 and higher, as long as all APIs referenced are compatible (we rarely obsolete some). So, you could have one appbundle
built on Revit 2018, and have multiple activities
referencing the same appbundle
and higher engine
version than the appbundle references.
You also have the flexibility of using one single activity unqualified id
that serves multiple engines through aliases. For example below shows how you may do so with DeleteWallsActivity
.
YourNickname.DeleteWallsActivity+dev_2018
YourNickname.DeleteWallsActivity+stg_2018
YourNickname.DeleteWallsActivity+prod_2018
YourNickname.DeleteWallsActivity+dev_2019
YourNickname.DeleteWallsActivity+stg_2019
YourNickname.DeleteWallsActivity+prod_2019
Or create an unqualified id
for each engine. For example the below shows DeleteWallsActivity2018
and DeleteWallsActivity2019
.
YourNickname.DeleteWallsActivity2018+dev
YourNickname.DeleteWallsActivity2018+stg
YourNickname.DeleteWallsActivity2018+prod
YourNickname.DeleteWallsActivity2019+dev
YourNickname.DeleteWallsActivity2019+stg
YourNickname.DeleteWallsActivity2019+prod
Since each fully qualified id YourNickname.YourActivity+alias
has an activity version associated with it and each of those in turn references their respective appbundles
with their fully qualified id, you can have any one of the schemes above irrespective of whether you created single or multiple appbundles
per engine.
Also read more about aliases
and ids
here:
https://forge.autodesk.com/en/docs/design-automation/v3/developers_guide/aliases-and-ids/
Upvotes: 5