Parts List Problems

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I was working with my Marco this weekend and I am having problems generating a Parts List for my Assembly.
My drawing consists of one base assembly view and 5 projected views. It also has 1 part view (view 7).
I copied the code from (Help- Programming Help- Cut and Past Sample Code-Drawing Tables-Create Parts List) and it works if I use (base View 7) which generates a Parts List for one object but I cannot get the Parts List of the entire assembly (base View1). Please see simplified description of code below. Thank you for your time.
Private Sub UserButtonz1_Click()
'
Creates several iParts and saves them
'
Creates an Assembly with the above iParts and saves it.
'
Creates an Exported BOM and saves it.
'
Creates the drawing
'
(Base View 1 Assembly)
Dim oBaseView As DrawingView
Set oBaseView = oSheet.DrawingViews.AddBaseView(oDoc2, oPnt, SCALE1, kFrontViewOrientation, kHiddenLineDrawingViewStyle)
'
Projected Views
'
(Base View 7 of part)
Set oPnt = ThisApplication.TransientGeometry.CreatePoint2d(62#, 30#)
Set oBaseView = oSheet.DrawingViews.AddBaseView(oDoc3, oPnt, SCALE2, kFrontViewOrientation, kHiddenLineDrawingViewStyle)
'
Add Notes to the Drawing
'
ADDING THE PARTS LIST TO DRAWING
On Error Resume Next
Set oDrawDoc = ThisApplication.ActiveDocument
Set oSheet = oDrawDoc.ActiveSheet
Dim oDrawingView As DrawingView
Set oDrawingView = oSheet.DrawingViews(1) '(If I use View(7) here It works but for only that part)
Dim oBorder As Border
Set oBorder = oSheet.Border
Dim oPlacementPoint As Point2d
Set oPlacementPoint = ThisApplication.TransientGeometry.CreatePoint2d(85, 11)
Dim oPartsList As PartsList
Set oPartsList = oSheet.PartsLists.Add(oDrawingView, oPlacementPoint)
'
Create revision table
'
Save Drawing
End Sub