Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
dibujocad
in reply to: dibujocad

Hi 

If I´m not wrong, firstly your code take the "BOMStructure" of the main assembly and set this "BOMStructure" to all its parts and subassemblies, right?. That´s not exactly what I´d like to manage, but maybe I explained badly, sorry. This is what I was trying to get:
1- Traverse main assembly

2- Check "BOMStructure" of its subassemblies. In case the "BOMStructure" is "purchased" then set the "BOMStructure" of all  parts and subassemblies contained in such subassembly to "purchased" too. If "BOMStructure" is different to "purchased", nothing happens.

 

Anyway, I´ve tried your code and I don´t know why but it gives an error of "procedure call" in this part "oOcc.BOMStructure = oBOMStr".