Duplicate types in Inventor Namespace.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
All,
I have hit a weird bug in my code that only occours at runtime. I haven't posted too much code as the project is in a solution with a lot of code.
The if statement in my code..
Private Sub export_materials_rough_list_assy(componentdef As Inventor.ComponentDefinition, excelwks As Microsoft.Office.Interop.Excel.Worksheet, ByRef ctr As Integer, ByVal baseqty As Integer, ByVal parent As String)
If componentdef.Type = ObjectTypeEnum.kPartComponentDefinitionObject Then
bom = componentdef.BOMStructure
For Each bomv As Inventor.BOMView In componentdef.BOM.BOMViews
If bomv.ViewType = BOMViewTypeEnum.kStructuredBOMViewType Then
For Each bomrow As Inventor.BOMRow In bomv.BOMRows
Dim process As Boolean
Select Case bomrow.BOMStructure
Case Is = BOMStructureEnum.kVariesBOMStructure
process = True
........
throws an error ObjectTypeEnum.kPartComponentDefinitionObject is ambiguous in namespace inventor.
All the following lines and references to Inventor object model work correctly.
The same error gets thrown with
If componentdef.Type = Inventor.ObjectTypeEnum.kPartComponentDefinitionObject Then
Any suggestions as to where a duplicate name in the same namespace creeping in could be coming from would be appreciated.