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: 

Use of getChoice = Choose(index, "first", "second", "third")

2 REPLIES 2
Reply
Message 1 of 3
MaheshwarMD
699 Views, 2 Replies

Use of getChoice = Choose(index, "first", "second", "third")

Hello,

 

I  have a query regarding one i-Logic function.

In i-Logic, there is a function called getChoice = Choose(index, "first", "second", "third")

Please find attached snapshot of i-Logic browser for your reference.

What is the use of this function and how to use the same.

I am unable to figure it out, could you please share any simple example using this function.

Please help me out on same.

Mahesh
2 REPLIES 2
Message 2 of 3
VdVeek
in reply to: MaheshwarMD

The "choose" option checks which MultiValue Parameter is chosen.

If you create a Parameter with the name: ParamName and add some values (example: 1, 2, 3) to it and choose one, let's say option 2.

 

When you create a rule with the next lines

 

getChoice = Choose(ParamName, "first", "second", "third")

MessageBox.Show("Chosen Value : " & getChoice, "Title")

 

and run this rule it shows "Chosen Value : second"

So you don't see the value of ParamName but the coresponding string.

Rob.

 

Autodesk Inventor 2015 Certified Professional & Autodesk Inventor 2012 Certified Professional.
Message 3 of 3
WCrihfield
in reply to: VdVeek

So...:this function can only be used similarly to IndexOf(ParamName), only it returns string type values instead of Integer type values?

Wesley Crihfield

EESignature

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

Post to forums  

Autodesk Design & Make Report