- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I think the BOM is probably one of the harder loops to grasp because of the amount of variables and levels. I have only started to dabble in here with the help of others work for guidance. I like to use the occurrence looping as I can understand it better and it is more universal for other operations. I would love to be at the code writing from scratch stage. I like to do this when I have time and can remember the steps. In normally ends up with some kind of searching in the help or the forum. I have no formal training in this, the same I am sure for a lot of the user in the forum and really spot things by memorizing where I had problems before and pointing them out.
I have notice you have used a hybrid method to get the value of the iproperty stock number. You are using a combination of the property sets method and the ilogic method. Although it works (just tested the get iprop snippet on its own inside a document) I am not sure if this could give you problems else where.
oSN = iProperties.Value(rDoc, "Design Tracking Properties", "Stock Number")
I found this chart that list all the iproperties in a handy chart. Some of these vary from version to version
https://adndevblog.typepad.com/manufacturing/2018/04/accessing-iproperties-through-ilogic-code.html
The typical method for ilogic iproperty snippet.
oSN = iProperties.Value(rDoc, "Project", "Stock Number")
Long method for getting/setting properties.
Dim oStockNum As String = oRowDoc.PropertySets.Item("Design Tracking Properties").Item("Stock Number").Value
Or if this helped you, please, click (like)
Regards
Alan