Inventor General Discussion

Inventor General Discussion

Posts: 12
Registered: ‎03-05-2012
Message 1 of 2 (791 Views)

Rules and Programming in Inventor

791 Views, 1 Replies
11-01-2012 07:05 AM

Hi All


I have done the below code to turn on and off elements depending on a selection from a multi menu. Basically one of the patterns I have the first element of the pattern switched off always but the other elements need to flick on and off.


Is there a way that you can turn individual elements on and off?


If Posts_On_FL1 = "Yes"  Then


Component.Visible("Component Pattern 7:1") = True

Component.Visible("GP1:1") = False

Component.Visible("Component Pattern 13:1") = True

Component.Visible("GP2:1") = True




Component.Visible("Component Pattern 7:1") = False

Component.Visible("GP1:1") = True

Component.Visible("Component Pattern 13:1") = False

Component.Visible("GP2:1") = False


End If


Let me know as soon as posisble please, thanks in advance!!




*Expert Elite*
Posts: 2,538
Registered: ‎09-13-2011
Message 2 of 2 (763 Views)

Re: Rules and Programming in Inventor

11-01-2012 09:35 AM in reply to: jhough12

This link is to a thread that conains code to suppress elements of the pattern. Since you're already familiar with the IsVisible method, you shouldn't have a problem converting the code. Note that while you cannot suppress the first element of a pattern, I don't think you'll have a problem toggling its visibility.



Mike (not Matt) Rattray

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.