I’m trying to make a simple AV Screen with a drop down option list for the different sizes (32",42" etc).
I want the choice effect both the overall width and height.
The drop down value is linked to the overall width, so that’s covered.
I’ve linked the OPTION INDEX to the “TVSize”,which is the name of the custom field for the dropdown list.
Then i’ve added =Choose value to the LenZ field with 2 values which relate to the widths of the 2 screen sizes in the dropdown option.
I can’t seem to find the error involved, any help would be great.
Many Thanks in Advance
Adam test tv.skp (237.6 KB)
On Mac these smart Quotes can be toggled on /off in MAC-System- Preferences-Keyboard-Text,
you should uncheck when working with formulas
Also ; You’ve set TVHeight to OPTIONINDEX (‘TVSIze’) but the values of the list options off that attribute contains actual lengths in CM, not : 1,2,…N (Integer list options) .
Now, the CHOOSE function in lenZ can’t ‘choose’ so it pops an error
It would be nice if the DC would be smart enough to out smart the smart quotes! Maybe I should file a feature request? Even though for myself I have outgrown the DC’s and don’t use them anymore.
I also messed up some of the naming, so it got stuck in a loop.
The lengths in cm is the result I was aiming for, so if say 42" size was selected in the options, then it would give a value for the screen width and the choose/choose index would produce the screen height result.
I guess they may be a better way to approach this.
Basically I want to be able to select a screen option from a list and is would effect the width and height of the model.
The user of the DC chooses an option ( in this case 32’’ or 42’') these are two options , so I would assign the values of those options in the Attribute’s list options dialog.(1 and 2)
You could then easily choose the corresponding Height (in LenZ) and Width (in LenX) with the CHOOSE-function.
for LenZ:
CHOOSE(“option number of User selected choice”, “Heigth if option number=1”,“Height if option number=2”)test tv3.skp (233.1 KB)
Combining the two functions would give:
CHOOSE(OPTIONINDEX(“User’s choice in INTEGER number”), “Length if User chose option 1”, “Length if user chose 2”)
You should consider this:
The User of the DC chooses an option: 32’’ inch or 42’’
but this Size is the diagonal of the screen ( which is dependant of LenX and LenZ) and I don’t want the User to let him choose the LenX and LenZ so I must use the choice of the User (option 1 or 2) in two formulas: one for LenX and one for LenZ
With the optionindex, I can put the corresponding values of the User’s choice in any other Attribute.
Thanks, was interesting getting everything to work together.
Would have been nice if instead of an array in the line, we could create a table and have it pull from the table, think Excel.