iLogic multivalue list

iLogic multivalue list

CristianCarMont
Explorer Explorer
5,591 Views
6 Replies
Message 1 of 7

iLogic multivalue list

CristianCarMont
Explorer
Explorer

Hi, I have an iLogic model with 3 different models of furniture that i can select through a parameter called "Model". 

Whenever I choose one of the models in my iLogic form it enables multiple features corresponding to each one of the models and disables the ones that don't belong to it. 

But now I want to "restrict" parameters (i.e. width) to specific values with respect to the model that I'm working on. 

For example

For the model A I just want to be able to pick up widths of 20, 26 and 30

For the model B I want widths of 16, 20 and 22

And for model C I want widths of 25 and 30. 

 

How can I restrict the values that I can assign to these parameters given the model that im currently working on without using lots of if's and having a very long piece of code? Also it would help to know how can I disable certain parameters when choosing certain model and enabling them for other models. I've read there's a function called multivalue list to assign possible values to parameters. Do you know how can I use that function for this application? Thanks

0 Likes
Accepted solutions (1)
5,592 Views
6 Replies
Replies (6)
Message 2 of 7

jtylerbc
Mentor
Mentor

It sounds like the multivalue list is the best solution to what you're looking for.  That isn't technically an iLogic thing at all, but iLogic can make use of it.

 

Whether it is iLogic-related or not, you make the parameter multivalue by right-clicking it in the Parameters dialog box.  Then you'll be able to edit the list of allowable values.

 

Once you've done that, you can add the parameter to an iLogic form, and it will automatically create a dropdown list with the same values you entered in the Parameters dialog box.  If you already have it added to a form, you'll need to remove it and then put it back for it to detect the list.

0 Likes
Message 3 of 7

CristianCarMont
Explorer
Explorer

Thanks for your reply @jtylerbc 

I know the multivalue lists let you assign specific values to certain parameters and have drop down lists, I'm already using that. What I want to do is to "link" 2 parameters so for example lets say I have parameters a and b

 

if  parameter a = x

then i want that b can only take the values of 1, 2 or 3

 

if parameter a=y

then  b should only take 4 or 5

 

and if a=z

then b should take only 1 or 5

 

Do you know if there is a way to do that?

 

0 Likes
Message 4 of 7

JhoelForshav
Mentor
Mentor
Accepted solution

Hi @CristianCarMont 

With the parameter names in your example (a and b), This short iLogic rule should do it 🙂

MultiValue.SetValueOptions(True, DefaultIndex := 0)

Select Case a
Case "x"
	MultiValue.SetList("b", 1, 2, 3)
Case "y"
	MultiValue.SetList("b", 4, 5)
Case "z"
	MultiValue.SetList("b", 1, 5)
End Select

 

Message 5 of 7

CristianCarMont
Explorer
Explorer

Thanks @JhoelForshav !

0 Likes
Message 6 of 7

eugen.gutol
Contributor
Contributor

Hi Guys, 

 

How to do something a bit different: I have a multivalue list with about 20 items in it, how can I remove 2 specific of those items based on a "Select Case" filter ?

 

Of course I can copy/paste the list again without those 2 values, but it seems stupid to do so in case the list will grow in future.

0 Likes
Message 7 of 7

darok8
Participant
Participant

Good contribution, my problem was similar, only that the variable was of type Text, and it worked correctly for me, I'll show you...

MultiValue.SetValueOptions(True, DefaultIndex :=0)
Select Case Cabezal
Case "Boton"
	MultiValue.SetList("Color", "Verde", "Amarillo", "Azul", "Blanco", "Negro", "Rojo")
Case "Selector"
	MultiValue.SetList("Color", "Verde", "Amarillo", "Azul", "Blanco", "Rojo")
End Select
0 Likes