Inventor General Discussion

Inventor General Discussion

Reply
Contributor
jhough12
Posts: 12
Registered: ‎03-05-2012
Message 1 of 2 (639 Views)

Rules and Programming in Inventor

639 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

 

Else

 

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!!

 

Jon

 

*Expert Elite*
mrattray
Posts: 2,493
Registered: ‎09-13-2011
Message 2 of 2 (611 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.

http://forums.autodesk.com/t5/Autodesk-Inventor/Cannot-suppress-pattern-element-using-ilogic/td-p/35...

 

 

Mike (not Matt) Rattray

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.