Inventor General Discussion

Inventor General Discussion

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

Rules and Programming in Inventor

761 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,513
Registered: ‎09-13-2011
Message 2 of 2 (733 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
Are You Going To Be @ AU 2014? Feel free to drop by our AU topic post and share your plans, plug a class that you're teaching, or simply check out who else from the community might be in attendance. Ohh and don't forgot to stop by the Autodesk Help | Learn | Collaborate booths in the Exhibit Hall and meet our community team if you get a chance!