Message 1 of 7

Not applicable
09-20-2016
02:20 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm trying to have the ability to insert different styles of BOM's depending on the style of drawing I'm working on using iLOGIC.
The "Internal" BOM uses predesigned columns, ITEM, QTY, DESCRIPTION, PART NUMBER.
I want to create an "External" BOM with ITEM, QTY, DESCRIPTION, STOCK NUMBER, VENDOR.
Below is my code, can this be edited to change the specified inserted columns?
These are triggered from a created form with buttons.
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. Please insert base a view.", "iLogic") Return End Try ' Set a reference to th sheet's border Dim oBorder As Border oBorder = oSheet.Border Dim oPlacePoint As Point2d If Not oBorder Is Nothing Then ' A border exists. The placement point ' is the top-right corner of the border. oOffset = -1.42875 'user defined offset oX = oBorder.RangeBox.MaxPoint.X + oOffset oY = oBorder.RangeBox.MaxPoint.Y oPlacePoint = ThisApplication.TransientGeometry.CreatePoint2d(oX,oY) Else ' There is no border oPlacementPoint = ThisApplication.TransientGeometry.CreatePoint2d(20, 20) iLogicVb.UpdateWhenDone = True 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 Internal Parts List", "iLogic") Catch ' Create the parts list. oPartsList = oSheet.PartsLists.Add(oDrawingView, oPlacePoint) End Try
Solved! Go to Solution.