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: 

iLogic Multivalue List bug? Not updating?

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
SteveX82
1118 Views, 2 Replies

iLogic Multivalue List bug? Not updating?

I've stumbled upon a problem while writing an iLogic rule that prompts the user to reselect an iLogic parameter value whenever an invalid selection is initially made.

 

Please see the attached part file that includes a simple example of this code. There are two iLogic parameters, each of which has values that I plan to select with the Multivalue pulldown list. Depending on the choice of High or Low for the "Range" parameter, only certain numbers are permissable for "Value".

 

The rule successfully catches unpermitted values when selected from the Multivalue pulldown list and prompts the user with a new list to choose from. Unfortunately, this re-selection only updates the "Equation" field in the iLogic Parameters table. The Multivalue column value remains the same (and invalid) value. If you click anywhere in the iLogic Parameter table, the rule again prompts the user to re-select a new value, but this time both the "Equation" and "Multivalue" fields are correctly updated.

 

Curiously, I've noticed that the rule works flawlessly if values are entered manually into the "Equation" column instead of choosing from the pulldown list.

 

Can anybody spot what I'm doing wrong? Is this a bug? I'm using IV2010 SP4

2 REPLIES 2
Message 2 of 3
MjDeck
in reply to: SteveX82

I don't know exactly why your rule doesn't work.  But here's another way to do it:

' --------------------

MultiValue.SetValueOptions(True)

IF RANGE="LOW"
 MultiValue.SetList("VALUE", 1, 2, 3)
END IF

IF RANGE="HIGH"
 MultiValue.SetList("VALUE", 3, 4, 5)
END IF

' ---------------------

The SetValueOptions statement has this effect: when you change the multi-value list it will (if necessary) change the current value of the parameter to match something in the list.  It chooses the value that is closest to the current value of the parameter.  With this method, you don't have to pop up the InputListBox.  The parameter is automatically set to something in the list.

 

 


Mike Deck
Software Developer
Autodesk, Inc.

Message 3 of 3
SteveX82
in reply to: MjDeck

Thanks, Mike!

 

I had considered a similar workaround, but I was missing the MultiValue.SetValueOptions(True) line to set a default value. This will work perfectly.

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

Post to forums  

Autodesk Design & Make Report