sketchucation logo sketchucation
    • Login
    šŸ¤‘ SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

    Dynamic Component Help

    Scheduled Pinned Locked Moved Dynamic Components
    sketchup
    3 Posts 2 Posters 1.2k Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J Offline
      Jimmymino
      last edited by

      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.

      Jimmy MiƱo
      Owner
      the archiTECHtural workshop
      http://www.thearchitechturalworkshop.com

      1 Reply Last reply Reply Quote 0
      • J Offline
        Jim
        last edited by

        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.


        2014-12_186.png

        Hi

        1 Reply Last reply Reply Quote 0
        • J Offline
          Jimmymino
          last edited by

          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.

          Jimmy MiƱo
          Owner
          the archiTECHtural workshop
          http://www.thearchitechturalworkshop.com

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post
          Buy SketchPlus
          Buy SUbD
          Buy WrapR
          Buy eBook
          Buy Modelur
          Buy Vertex Tools
          Buy SketchCuisine
          Buy FormFonts

          Advertisement