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

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