OPTIONLABEL fails for LenZ

It seems that OPTIONLABEL() properly returns the string for Material selection by typing OPTIONLABEL(“Material”). However, it fails when applied to LenZ by typing OPTIONLABEL(“LenZ”). The attached model shows my problem.

Can someone please help me understand how to make this work, or else why it doesn’t?

Thanks!

Dave

No OPTIONLABEL for LenZ.skp (107.4 KB)

Make your own variable len_z
Set that in the user-panel input.
Then it can be set/reset.
Then in your code then something like
LenZ=len_z

Thanks, TIG.

Anyone have any idea WHY it should require the second step? Seems odd that the OPTIONLABEL() function works for some attributes, but fails for others? I’d love to understand why as it may help me avoid other problems in working with DCs down the road.

Thanks!

I posted a question about OPTIONINDEX which appears similar to what your example shows with OPTIONLABEL(“material”), in that it seems to show the label from the previous iteration: OPTIONINDEX Example in Dynamic Pricing has "Delay" Problem .

I have noticed when you pass a value to lenx,y,z it is evaluated first as a number, so “000” is shown as 0 not as text
so also with numbers like 12" or 12cm is evaluated as 12 without the units

whereas optionlabel matches the contents so 6" is not equal to 6 so no match found.