Dynamic Component Help
-
Hey All,
Having some trouble with executing a function within a dynamic component and wondering if anyone could help.
Goal:
I have a complex model of a furniture piece with several layers of nested components. The top level component has various options that an end user can choose from to customize their furniture piece. What I want is for a nested element (a shelf) to hide when the user picks a specific height for the furniture piece.
Execution:
I created a custom attribute and named it 'furnitureheight'. This attribute is drop down list with 3 heights that the user can choose from and I assigned each 'List Option' a 'Value'. The List options & Values are as follows:
14" - 35.56cm
22" - 55.88cm
34" - 86.36cm
This is currently resizing the furniture piece accurately. Next, to hide the shelf, I added a "Hidden" attribute to the shelf component with the following "IF" function: =IF(furnitureheight=35.56,1,0)
Problem:
The shelf is not hiding. Im not sure if it is a syntax error or if, because the shelf is nested 4 layers in from the top level component, there is something not right. Just to clarify, I am not getting an error message in sketchup within the attribute and I am passing down the values of the list from parent to child all the way down to the shelf component. I just dont know if I need to specify the value as "35.56" or "35.56cm" or "14". Ive tried all of them and nothing is working. -
First thing I would check if the value for the height in the IF function is expected. Click the Toggle Formula View button to check it. (see image)
Floating-point numbers are troublesome. You may need to check for the height to be less than 36 instead of being exactly 35.56.
-
Thanks Jim. I figured out that if I change the "Units" in the drop down list from 'Default:Text' to 'Decimal Numbers' the IF function worked out. Hpe that helps anyone else going through this.
Advertisement