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

Garret, sorry i'm not getting notifications for replies. 

I am already doing as you suggest in using foreach oAsmDoc.ComponentDefinition.Occurrences(i)' but like i say the performance is not great once the count increases.  By comparison i can ctrl/shift select the same components in the browser and it turns off visibility in say 1 second vs 30s+ using the foreach method.

 

I thought there may be a way to add all the components i want turned off into a selectset or something, then apply the visibility only once, rather than in a loop, but the .setvisibility method does not allow this.  I also thought in the browser it's more akin to using ReferenceDocumentDescriptor than ComponentOccurences.


Did you find this reply helpful ? If so please use the Accept as Solution or Kudos button below.

---------------------------------------------------------------------------------------------------------------------------
Inventor 2010 Certified Professional
Currently using 2023 Pro