Design Automation for Revit ignores `PackageContents.xml` configuration.
ricaun opened this issue · 6 comments
By default Design Automation for Revit selects the first ComponentEntry
in the PackageContents.xml
ignoring the version defined in the RuntimeRequirements
.
In the example below, the version 2021 of the .addin
is loaded by default even if is selected the engine for Revit 2025.
<?xml version="1.0" encoding="utf-8"?>
<ApplicationPackage SchemaVersion="1.0" AutodeskProduct="Revit" Name="RevitAddin.DA.Tester" AppVersion="1.3.0" ProductType="Application" ProductCode="7c324916-9f8d-43b0-b226-da67d2504393">
<Components Description="Revit 2021">
<RuntimeRequirements OS="Win64" Platform="Revit" SeriesMin="R2021" SeriesMax="R2021" />
<ComponentEntry AppName="RevitAddin.DA.Tester" ModuleName=".\Contents\RevitAddin.DA.Tester\1.3.0-beta.1\2021\RevitAddin.DA.Tester.addin" />
</Components>
<Components Description="Revit 2025">
<RuntimeRequirements OS="Win64" Platform="Revit" SeriesMin="R2025" SeriesMax="R2025" />
<ComponentEntry AppName="RevitAddin.DA.Tester" ModuleName=".\Contents\RevitAddin.DA.Tester\1.3.0-beta.1\2025\RevitAddin.DA.Tester.addin" />
</Components>
</ApplicationPackage>
A reusable solution would be to first search for the right version of the engine in the bundle. And if the version does not exist in the PackageContents.xml
, select the first one like in the current version of the DA4R Revit 2025 (RVTDA 04-04-2024).
Video: https://youtu.be/SmcY-1_sNDM
APS Blog
Here is a blog reference with the DA4R limitation with PackageContents.xml
.
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.
Output file for DA4Revit 2025.
{
"VersionName": "Autodesk Revit 2025",
"VersionBuild": "25.0.2.419",
"TimeStart": "2024-04-14T23:32:14.8699528Z",
"Text": "2025",
"Reference": "21.0.0.0",
"FrameworkName": ".NETFramework,Version=v4.8"
}
The DLL loaded is for Revit 2021, as shown in the Reference
and FrameworkName
.
Revit engine:
{
"productVersion": "25.0",
"deprecationDate": "2028-03-29",
"description": "Revit 2025 (RVTDA 04-04-2024).",
"version": 117,
"id": "Autodesk.Revit+2025"
}
Issues:
- Does not work with bundle with multiple Revit version
- Console is not working and does not show in the report.
Looks like the Console
issue was fixed, the version still 117
.
Warning: echo (62184 bytes) exceeds console output size of 23000, skipping reading still happens.
Sometimes the Console works sometime does not, I guess depend of the size of the Console.WriteLine
.
The ticket was logged as #RVTDA-2079.
Video about the Revit.DesignApplication project.
Revit engine:
{
"deprecationDate": "2028-03-29",
"productVersion": "25.0",
"description": "Revit 2025 (RVTDA 09-23-2024).",
"version": 118,
"id": "Autodesk.Revit+2025"
}
Maybe the log was fixed.