Hi @estringer
You could definitely have another column in your spreadsheet simply stating if the virtual component is purchased and then add another lookup line within your rule. Based on your posted code, I will use "oProp8" as the variable to hold that lookup value and will assume that the value will return either a "Yes" or "No", but feel free to use whatever you like. Then in the section where you are updating the properties for your virtual component, you should just be able to add the following:
If oProp8 = "Yes" Then
virtocc.Definition.BOMStructure = kPurchasedBOMStructure
End If
You could always add the above block within a Try/Catch block, but as long as "oProp8" (or whatever name you assign the variable) exists in the rule, I don't believe this will error out, as if the condition isn't met, it will just skip that part of the code and leave the virtual component with a BOM Structure of "Normal".
It's a pretty simple addition, but I don't believe it needs to be more complicated.
Hope that helps!
Cheers,
Q Visser
Current Software:
Inventor Professional 2024.2 & Vault Professional 2024.2