Message 1 of 3

Not applicable
11-23-2020
07:03 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello all,
I am trying to add a parts list into a drawing using the API. Adding the list itself is not the problem, however the placement is rather tricky.
The drawing informtion is placed in the lower left corner. I want to place a parts list on top of the infobox.
The amount of parts varies because the assembly it corresponds to is configurable. So when there are less parts a gap appears between the drawing info and the parts list. (see image for example)
Also, here is the code I got from the inventor API/programming help page.
On Error Resume Next
' Set a reference to the first drawing view on
' the sheet. This assumes the first drawing
' view on the sheet is not a draft view.
Dim oDrawingView As DrawingView
oDrawingView = oSheet.DrawingViews(1)
' Set a reference to th sheet's border
Dim oBorder As Border
oBorder = oSheet.Border
Dim oPlacementPoint As Point2d
' There is no border. The placement point
' is the top-right corner of the sheet.
oPlacementPoint = ThisApplication.TransientGeometry.CreatePoint2d(41, 12.5)
' Create the parts list.
Dim oPartsList As PartsList
oPartsList = oSheet.PartsLists.Add(oDrawingView, oPlacementPoint)
How can ik make the partslist snap to the drawing info box regardless of the amount of parts?
Thank you in advance.
Lennart
Solved! Go to Solution.