Message 1 of 5
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I'm trying to retrieve a document (part/assy) to get its info, from the Partlist in an IDW. But I get this error.
Sometimes it works (with some assy) but never with a single part
Sub IndexPartslist() Dim oDoc As DrawingDocument Set oDoc = ThisApplication.ActiveDocument Dim oSheet As Sheet Set oSheet = oDoc.ActiveSheet Dim oPL As PartsList Set oPL = oSheet.PartsLists.Item(1) Dim drawBomRow As DrawingBOMRow Dim oBomDoc As Document Dim oPLRow As PartsListRow Dim i As Integer: i = 1 For Each oPLRow In oPL.PartsListRows Debug.Print oPLRow.Item("ITEM").Value Set drawBomRow = oPLRow.ReferencedRows.Item(1) Set oBomDoc = drawBomRow.BOMRow.ComponentDefinitions.Item(1).Document 'ERROR line Next End Sub
Any help would be greatly appreciated
Thanks
Solved! Go to Solution.