07-26-2017
07:18 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
07-26-2017
07:18 AM
I get the same error with the code you just sent, traced it to this line:
Sub Main() Dim oCD As ComponentDefinition For Each oSubDoc in ThisDoc.Document.AllReferencedDocuments If oSubDoc.DocumentType = kAssemblyDocumentObject 'AssemblyDocument If oSubDoc.ComponentDefinition.Type = ObjectTypeEnum.kWeldmentComponentDefinitionObject ' 'Dim oWCD As WeldmentComponentDefinition = oSubDoc.ComponentDefinition ' 'oCD = oWCD ' 'MsgBox(oWCD.Document.FullFileName) ' 'Goto Continue1 ' Else ' Dim oACD As AssemblyComponentDefinition = oSubDoc.ComponentDefinition ' oCD = oACD ' End If ' Else 'Part Doc ' If oSubDoc.ComponentDefinition.Type = ObjectTypeEnum.kSheetMetalComponentDefinitionObject ' Dim oSCD As SheetMetalComponentDefinition = oSubDoc.ComponentDefinition ' oCD = oSCD ' Else ' Dim oPCD As PartComponentDefinition = oSubDoc.ComponentDefinition ' oCD = oPCD End If End If Next 'Continue1: 'MsgBox(oCD.Document.FullFileName) End Sub