Message 1 of 3

Not applicable
02-13-2017
11:53 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
i sometimes get the following error by placing a partlist on a inventor DWG
"Object of type 'System.UInt32' cannot be converted to type 'Inventor.CommandTypesEnum"
Why is that?
I use this VB.NET code:
Dim oDrawDoc As Inventor.DrawingDocument oDrawDoc = m_inventorApplication.ActiveDocument Dim oSheet As Inventor.Sheet oSheet = oDrawDoc.ActiveSheet Dim oDrawingView As Inventor.DrawingView oDrawingView = oSheet.DrawingViews.Item(1) Dim oRefDoc As Inventor.AssemblyDocument oRefDoc = oDrawingView.ReferencedFile.ReferencedDocument Dim oBOM As Inventor.BOM oBOM = oRefDoc.ComponentDefinition.BOM oBOM.StructuredViewEnabled = True Dim oBOMView As Inventor.BOMView oBOMView = oBOM.BOMViews.Item("Structured") Dim oPoint2D As Inventor.Point2d oPoint2D = m_inventorApplication.TransientGeometry.CreatePoint2d(66,0) Dim oPartList As Inventor.PartsList oPartList = oSheet.PartsLists.Add(oDrawingView, oPoint2D, Inventor.PartsListLevelEnum.kStructured, Nothing, 1, False)
Geert
Solved! Go to Solution.