DC Choose OptionIndex Function Callback Error

How come I get an error here?

Base.skp (402.8 KB)

CHOOSE() requires a number, so you need to set the values in the DoorType attribute accordingly:

Then, you won’t have to repeat it in the Pull Out, just refer to the DoorTypeIndex attribute that is calculated in the Parent (1 Door):

1 Like

Thank you @MikeWayzovski.

I have a question about this.

hidden_example2.skp (34.4 KB)
this file is from the post below.
https://forums.sketchup.com/t/hiding-showing-components-within-a-dynamic-component/66645/6?u=allusernametaken

and this example doesn’t the index number value, but still works. what makes it work?

As it turns out, the result of optionindex is the order-number, and so the result-value is still a number, the error was more likely in the Pull Out, where the Optionindex was used unnecessary.

1 Like

hm. I don’t understand what you said about the pull out. it is one of the options. so, don’t i need to put choose function in Pull out?

also, it’s not just pull out that has an error. all the other options have the same error.


image

I might have messed with your file, the one you posted is missing the “=” in the formula:

1 Like

wow. that was it. it works beautifully now. Thank you, @MikeWayzovski Sketchup Sage.