Message 1 of 5

Not applicable
05-16-2018
08:29 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
How can I change this code to insert the parts list above the title block
SyntaxEditor Code Snippet
If iProperties.Value("Summary", "Category") = "ASSEMBLY" Then iLogicVb.UpdateWhenDone = True ' Set a reference to the drawing document. ' This assumes a drawing document is active. Dim oDrawDoc As DrawingDocument oDrawDoc = ThisApplication.ActiveDocument 'Set a reference to the active sheet. Dim oSheet As Sheet oSheet = oDrawDoc.ActiveSheet ' 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 Try oDrawingView = oSheet.DrawingViews(1) Catch MessageBox.Show("No View found. Can not continue", "iLogic") Return 'return exits the rule End Try ' Set a reference to th sheet's border Dim oBorder As Border oBorder = oSheet.Border Dim oPlacementPoint As Point2d If Not oBorder Is Nothing Then ' A border exists. The placement point ' is the top-right corner of the border. oPlacementPoint = oBorder.RangeBox.MaxPoint Else ' There is no border oPlacementPoint = ThisApplication.TransientGeometry.CreatePoint2d(20, 20) End If Dim oPartslist As PartsList Try 'look for the first parts list found on the sheet 'if succesful finding it, 'tell the user,then Do Nothing oPartslist = oSheet.PartsLists(1) MessageBox.Show("There is an existing Parts List", "iLogic") Catch 'if one is not found, Create it oPartsList = oSheet.PartsLists.Add(oDrawingView, oPlacementPoint) End Try End If
Solved! Go to Solution.