Revit export with RemoveInternalParts
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi
I'm trying to make an export of an assembly to *.rvt with the api, it almost work but when I set:
oRevitExportDef.RemoveInternalParts = True
The export still include all Internal Parts and when editing the export, the mark is not set:
Code sample
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 = kEachTopLevelComponentStructure oRevitExportDef.EnableUpdating = True oRevitExportDef.RemoveInternalParts = True ' Create RevitExport. Dim oRevitExport As RevitExport oRevitExport = oDoc.ComponentDefinition.RevitExports.Add(oRevitExportDef)