Community
Inventor Forum
Welcome to Autodesk’s Inventor Forums. Share your knowledge, ask questions, and explore popular Inventor topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Rules and Programming in Inventor

1 REPLY 1
Reply
Message 1 of 2
jhough12
1184 Views, 1 Reply

Rules and Programming in Inventor

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

 

1 REPLY 1
Message 2 of 2
mrattray
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

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report