Hi,
I'm currently working alot with multi value lists. And when i change a certain parameter change the whole multi value list changes.
Is there a way select then a random value from the list to avoid error's?
Example:
First input: selected value 1
Parameter value = DIN
Other parameter Multi value list= 1;2;3;4;5
Second input: Parameter changes to ANSI and i need to auto fill in a value from the new list, to avoid a error for futher code based on the multi value parameter
Parameter value = ANSI
Other parameter Multi value list= 100;200;300;400;500
One way to do it would be to have an embedded spreadsheet.
and call it like this
Select Case Standard
Case "DIN"
MultiValue.List("Sizes") = GoExcel.CellValues("3rd Party:Embedding 2", "Sheet1", "B2", "B22")
Case "Ansi"
MultiValue.List("Sizes") = GoExcel.CellValues("3rd Party:Embedding 2", "Sheet1", "B23", "B39")
End Select
I guess, on this principle you can use :
Select Case Standard
Case "DIN"
MultiValue.SetList("Size", "0.5""", "0.75""", "1""", "1.25""", "1.5""", "2""", "3""", "4""", "6""")
Case "Ansi"
MultiValue.SetList("Size", "0.5""", "0.75""", "1""", "1.25""", "1.5""", "2""", "3""", "4""", "6""")
End Select
I haven't tested the above and I only mention excel because that's how I've done it.
I can select my multivalues from excel that is not the problem..
The problem is when it switches and the value equals 1 from the list, and the new list does not contain 1 it needs to switch to a value that is in the list.
You can use find, that's what I have to select a tank volume form excel:
If Custom_Tank = False Then
'find the next tank size where volume is = or > than current req tank volume
i = GoExcel.FindRow("3rd Party:Embedding 2", "Sheet1","Tank_Type","=",Tank_Type,"Litres", ">=", TKVolume)
then I have an impossible large size as last row just to force selecting the last available size if user goes above limit.
I think I understand what you're saying. Let me try it out and get back to you.
Ok, thanks for the help 🙂
Can i ask what product you make? i can see it has somthing to do with tanks but it's not clear what kind of tanks.
It doesn't want to play ball. I tryied an intermediate parameter to hold the value and parse it over, still no luck.
Would it be an option to have them all in one multi-text parameter?:
ANSI 100
ANSI 200
ANSI 300
ANSI 400
ANSI 500
DIN 1
DIN 2
DIN 3
DIN 4
DIN 5
We are not tank manufacturers, but we buy so many we needed to be able to sketch it out and send a drawing with connection sizes and orientation. This is a water tank.
Running out of time, can't do any better:
Select Case FType Case "DIN" MultiValue.SetList("FSizes", "1", "2", "3", "4", "5") 'If num value of FSizes type ANSI 'set it to smallest ANSI, this only happens when changing standard. If Val(FSizes) >= 100 Then FSizes = "1" End If Case "ANSI" MultiValue.SetList("FSizes", "100", "200", "300", "400", "500") 'If num value of FSizes type DIN 'set it to smallest ANSI, this only happens when changing standard. If Val(FSizes) < 100 Then FSizes = "100" End If End Select
Hello Adrian,
I am very new to Ilogic and have no background of programming.
I was looking for exactly the same thing you have shown here.
In my case top drop down list will be a belt series, for example series, 400 to 3000
Then next tab will show type of belt available in that series.
From there, then I want to daw geomatry of belt, from predefined sizes.
How do I do it,
Do you mind helping me with bit more details of code.
if possile can you attach a part file having a sample code?
Thank you for your help in advance.
Regards
Parag