- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi everyone,
I recently found out (link, link) that it’s possible to choose the export version of an RFA file. This feature works perfectly through the user interface, but when using the API, I’m not getting the expected result.
In the sample below, I’m trying to save an RFA file to an earlier version using my custom template. The template is applied successfully, and I get a Mechanical Equipment family as intended. However, the RFA version remains the current one (in my case, 2025).
Dim oInvApp As Inventor.Application = ThisApplication
Dim oDoc As Document = oInvApp.ActiveDocument
Dim oDef As ComponentDefinition = oDoc.ComponentDefinition
Dim oNameValueMap As NameValueMap = oInvApp.TransientObjects.CreateNameValueMap
oNameValueMap.Add(“CustomRevitFamilyTemplate”,
"C:\ProgramData\Autodesk\RVT 2024\Family Templates\English\Metric Mechanical Equipment.rft")
oNameValueMap.Add("RevitFileVersion", "Legacy")
Dim oBIM As BIMComponent = oDef.BIMComponent
oBIM.ExportBuildingComponentWithOptions(IO.Path.ChangeExtension(oDoc.FullFileName, ".rfa"), oNameValueMap)
I’d really appreciate any insights or suggestions on how to make the API export to a previous version correctly.
Thanks in advance!
Andrii Humeniuk - CAD Coordinator, Autodesk Certified Instructor
LinkedIn | My free Inventor Addin | My Repositories
Did you find this reply helpful ? If so please use the Accept as Solution/Like.
Solved! Go to Solution.
