Dynamic Component Help

Dynamic Component Help

Postby Jimmymino » Fri Dec 26, 2014 4:10 pm

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.
0
Jimmy Miño
Owner
the archiTECHtural workshop
www.thearchitechturalworkshop.com

Jimmymino 
 

Re: Dynamic Component Help

Postby Jim » Fri Dec 26, 2014 4:27 pm

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.
0
Hi

Jim 
Global Moderator
 

Re: Dynamic Component Help

Postby Jimmymino » Fri Dec 26, 2014 6:10 pm

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.
0
Jimmy Miño
Owner
the archiTECHtural workshop
www.thearchitechturalworkshop.com

Jimmymino 
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 



 

Return to Dynamic Components

Who is online

Users browsing this forum: No registered users and 2 guests

Visit our sponsors: