Question about iLogic form

Question about iLogic form

phaeronkor
Advocate Advocate
773 Views
5 Replies
Message 1 of 6

Question about iLogic form

phaeronkor
Advocate
Advocate

Hello!

 

Got a question about Forms. I got a form with two variables. Second variable directly depends on the first one.

 

For example: if first one = 6, then second can be "1, 2 or 3". But if first is equal 4, second can only be 1 or 2.

 

If I choose 6, the second variable let me choose 1,2 or 3, that's cool. But if I pick 4 from first, the second shows 3 ul (what left from 6, despite of "2" is the maximum value for 4) by default until I chose another one from dropdown menu.

 

So the question is: is it possible to change the value of second variable automatically to highest availible? For example, if I chose 4 (after there was 6 in first variable) the second automatically changes to "2", instead of 3 ul (maximum value of "6").

 

In pics:

1.

01.PNG

2.

02.PNG

3.

03.PNG

Want this one to automatically change to highest value "2".

 

 

Thanks a lot!

 

Sorry for number confusion, hope it quite clearly to understand!

Accepted solutions (1)
774 Views
5 Replies
Replies (5)
Message 2 of 6

Mark.Lancaster
Consultant
Consultant

@phaeronkor

 

For programming you should be using the Inventor Customization Forum but its okay that your posted here...  Just in the future use that forum for better results..  I think I understand what you're looking for but I will tag @Curtis_Waguespack for his input.  He should be able to give you a correct solution.

Mark Lancaster


  &  Autodesk Services MarketPlace Provider


Autodesk Inventor Certified Professional & not an Autodesk Employee


Likes is much appreciated if the information I have shared is helpful to you and/or others


Did this resolve your issue? Please accept it "As a Solution" so others may benefit from it.

Message 3 of 6

Curtis_Waguespack
Consultant
Consultant

Hi phaeronkor,

 

Try something like this:

 

If Param_001 = 4 Then
	MultiValue.SetList("Param_002", 1, 2)
	Param_002 = 2 'default to max value
ElseIf Param_001 = 6 Then
	MultiValue.SetList("Param_002", 1, 2, 3)
	Param_002 = 3 'default to max value
End If

Set Multivalue.JPG

 

See attached 2015 file also.

 

I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com

EESignature

Message 4 of 6

phaeronkor
Advocate
Advocate

Hello!

 

Sorry for chosing wrong forum... I'll do the right next time.

 

For Your proposal...that works, but due to "Param_002 = 3" I can't change this parameter anymore through Form, it always set to 3.

0 Likes
Message 5 of 6

Curtis_Waguespack
Consultant
Consultant
Accepted solution

@phaeronkor wrote:

 

For Your proposal...that works, but due to "Param_002 = 3" I can't change this parameter anymore through Form, it always set to 3.


Hi phaeronkor,

 

 

Ooooops! Smiley Embarassed

 

Yeah, that was silly of me. Try something like this instead:

 

If Param_001 = 4 Then
	MultiValue.SetList("Param_002", 1, 2)
	If Param_002 = 3 Then  Param_002 = 2'default to max value
ElseIf Param_001 = 6 Then
	MultiValue.SetList("Param_002", 1, 2, 3)
End If

I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com

 

EESignature

Message 6 of 6

phaeronkor
Advocate
Advocate

Yeah! Thanks a lot! That is working, I see it without Inventor. Glad that there're guys like you!

 

BTW, next time I should think a little more harder before post my question on the forum, the answer was quite simple, my bad =(

0 Likes