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

Okay I feel your pain here,

Many times when I find myself needing to change the visibility of the same parts in my assembly I just stick all the parts in a browser folder and change the folders visibility manually. (It does it like a group)

 

However, if in your case you want to use Ilogic and the part names are all the same, the best way to loop it in my eyes is to use the:

'foreach occurrence in oAsmDoc.ComponentDefinition.Occurrences'.

Then to check to see if the occurrence.name is the part you want to change the visibility.

 

You might even want to consider creating LOD's to support that many parts to speed up Inventor if thats an option you can do. Let me know if this helps!