Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

iLogic program - Exporting .RVT file

urban.ostirZ44XW
Participant

iLogic program - Exporting .RVT file

urban.ostirZ44XW
Participant
Participant

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.

0 Likes
Reply
Accepted solutions (2)
409 Views
5 Replies
Replies (5)

Goran.JutrisaR5QUS
Contributor
Contributor

Hi,

 

do you maybe have solution to this?

 

tnx

0 Likes

DVNK4SZN
Explorer
Explorer

Hi,

same question.. Ilgic to export to .RVT

 

THX

0 Likes

Curtis_Waguespack
Consultant
Consultant
Accepted solution

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

 

Curtis_Waguespack
Consultant
Consultant
Accepted solution

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

 

Curtis_Waguespack_0-1732205980944.png

 

0 Likes

DVNK4SZN
Explorer
Explorer

Great! Thanks!

 

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

0 Likes