RFA file export options

RFA file export options

Andrii_Humeniuk
Advisor Advisor
213 Views
5 Replies
Message 1 of 6

RFA file export options

Andrii_Humeniuk
Advisor
Advisor

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.

Andrii_Humeniuk_0-1762355704956.png

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.

EESignature

0 Likes
Accepted solutions (1)
214 Views
5 Replies
Replies (5)
Message 2 of 6

Curtis_Waguespack
Consultant
Consultant

@Andrii_Humeniuk , I did a quick test and I see the same issue as you, in both Inventor 2025 and Inventor 2026 .

I wonder if @chandra.shekar.g or @MjDeck could take a look and tell us if there is a bug or if some change of syntax is needed.

 

Curtis_Waguespack_3-1762365612844.png

 

Curtis_Waguespack_2-1762365546273.png

 

 

 

EESignature

Message 3 of 6

chandra.shekar.g
Autodesk Support
Autodesk Support
Accepted solution

Hi @Andrii_Humeniuk ,

 

Please try to change below line:

 

oNameValueMap.Add("RevitFileVersion", "Legacy")
to:
 

oNameValueMap.Add("RevitVersion", "Revit 2024")

 
Thanks and regards,

Chandra shekar G


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network



Message 4 of 6

Andrii_Humeniuk
Advisor
Advisor

Thank you very much @chandra.shekar.g !

I suspected that "Legacy" might not be relevant, so I've been experimenting with it for the last 2 days, choosing from the following: "Revit 2024", "Revit2024", "RVT2024", "RFA2024", "2024", "24" and many others. But I didn't think that the key name might be wrong.

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.

EESignature

Message 5 of 6

Curtis_Waguespack
Consultant
Consultant

@chandra.shekar.g thank you for this reply.

 

Would you be able to get the documentation updated for this also?

I could not find any information in the help files that documented this.
Maybe add a sample as well? 
https://help.autodesk.com/view/INVNTOR/2026/ENU/?guid=BIMComponent_ExportBuildingComponentWithOption...

EESignature

Message 6 of 6

chandra.shekar.g
Autodesk Support
Autodesk Support

Thanks @Curtis_Waguespack ,

The message has been forwarded to concerned team.

Thanks and regards,
 


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network