Auto Share python Add on

Dear friends:
I’m trying to make a plugin so that you can auto-share all components automatically. I find that I can find them, but I can’t enable the auto share command, why is this?
Thank you so much for your willingness to help me! (1.9 KB)

from vcCommand import *
import vcMatrix
app = getApplication()
sim = app.Simulation

def my_state():
shared = [c for c in app.Components if c.IsUnique == True]

for c in shared:
#c.IsUnique == False
print c.Name
#c.AutoShare = True


Could not find AutoShare property in the help document.

auto-share all components automatically

Do you mean vcApplication().autoShareFeatureTrees()?

from vcCommand import *
app = getApplication()
app.autoShareFeatureTrees() (1.9 KB)

Yes. You are right! Thank you!

1 Like