Hello,
I'm working on a part that is being controlled by a form.
In this form I can choose between type 1 and type 2.
Type 1 has a given width dimensjons (from a list)
Type 2 can be any width you want.
What I would like to do now is using the type (1 or 2) to toggle between a multi value list and a normal parameter.
It could happen that I would jump back from 1 to 2 or from 2 to 1.
I was thinking like this:
if type = "1" then
MultiValue.SetList ("width", 600,700)
else if type = "2" then
"" and here I don't know. I would like to "remove" the list and just have the current value
End if
Any suggestions are welcome.
Thanks Toon
MultiValue.SetList("trinn_brede", 600, 700)
Solved! Go to Solution.
Solved by Curtis_Waguespack. Go to Solution.
Hi @toon.sol
You won't be able to change the parameter style of the form on the fly but you could have a multivalue list with a custom value. If you overwrite the parameter this value will stick. If you select the value from the list it will dissappear. Just set the parameter to custom in the parameters box.
This video shows the process
Hi @toon.sol
Create your multivalue parameter with a list, and then add it to the form. This way the form has a drop down list.
Then use something like this to set the list based on the value of the parameter called type
The line "MultiValue.SetValueOptions(True, DefaultIndex := 0)" tells the parameter to reset the first item in the list, when the current value of that parameter is not in the list.
MultiValue.SetValueOptions(True, DefaultIndex := 0) If type = "1" Then MultiValue.SetList("width", 600, 700) ElseIf type = "2" Then MultiValue.SetList("width", Parameter("width")) End If
You might also want to set the "Allow Custom Values" option for the list.
I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com
Can't find what you're looking for? Ask the community or share your knowledge.