Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
urban.ostirZ44XW
403 Views, 5 Replies

iLogic program - Exporting .RVT file

Hello,

can someone help me with writing an iLogic program that can export one .RVT document with all parts and subassembly of an assembly. Because if I export .RVT file with Inventor export wizard I get a file in witch I can reach only one level lower that the whole assembly is. I am attaching a photo of assembly exported into Revit file with just one level of subassembly. 

urbanostirZ44XW_0-1658228435261.png

urbanostirZ44XW_1-1658228449123.png

On that photo we can see the problem I have presented. Model marked with blue color have in Inventor also subassemblies and individual components, which in this case are exported as one.

Looking forward to a replay.

Hi,

 

do you maybe have solution to this?

 

tnx

DVNK4SZN
in reply to: urban.ostirZ44XW

Hi,

same question.. Ilgic to export to .RVT

 

THX

Hi @DVNK4SZN , welcome to the forum.

 

Here is an iLogic version based off of the VBA example included in Inventor's API help files.

 

Hope that helps, Curtis

 

Dim oDoc As AssemblyDocument
oDoc = ThisApplication.ActiveDocument

'Actiate the Master model state if the active model state is substitute
If oDoc.ComponentDefinition.ModelStates.ActiveModelState.ModelStateType = ModelStateTypeEnum.kSubstituteModelStateType Then
	oDoc.ComponentDefinition.ModelStates.Item(1).Activate
	oDoc = ThisApplication.ActiveDocument
End If

Dim oRevitExportDef As RevitExportDefinition
oRevitExportDef = oDoc.ComponentDefinition.RevitExports.CreateDefinition

oRevitExportDef.Location = "C:\Temp"
oRevitExportDef.FileName = "MyRevitExport.rvt"
oRevitExportDef.Structure = RevitExportStructureTypeEnum.kEachTopLevelComponentStructure
oRevitExportDef.EnableUpdating = True

' Create RevitExport.
Dim oRevitExport As RevitExport
oRevitExport = oDoc.ComponentDefinition.RevitExports.Add(oRevitExportDef)
, i 

 

How to find the API help:

Curtis_Waguespack_0-1732205866179.png

 

To the original question the only options are the same we have via the interface within Inventor.

 

Curtis_Waguespack_0-1732205980944.png

 

Great! Thanks!

 

is it also possible to update an already created Revit export?