Message 1 of 7

Not applicable
02-08-2019
08:09 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi Everyone,
I'm trying to create a rule that will do the following;
- Sort by Item # in Bill of Material
- Renumber Item # in Bill of Material
- Sort by Item # in Parts List (but not override the BoM Item #)
- Auto Update in Parts List
I created the code below but, I am running into an "object not defined" error. I'm not confident this is the only error that will come from this though. If anyone could take a look and let me know where I am going wrong, I would appreciate it.
Dim oDrawDoc As DrawingDocument oDrawDoc = ThisApplication.ActiveDocument 'BOM RENUMBER ' Set a reference to the BOM Dim oBOM As BOM oBOM.StructuredViewFirstLevelOnly = False oBOM.StructuredViewEnabled = True Dim oStructuredBOMView As BOMView oStructuredBOMView = oBOM.BOMViews.Item("Structured") Call oStructuredBOMView.Renumber(1, 1) 'PART LIST SORT oPartsList1 = oDrawDoc.ActiveSheet.PartsLists.Item(1) oPartsList1.Sort2("ITEM", 1, "DESCRIPTION", 1, "SIZE", 1, AutoSortOnUpdate, True)
Thanks
Solved! Go to Solution.