sketchucation logo sketchucation
    • Login
    🤑 SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

    Dynamic Wall Component

    Scheduled Pinned Locked Moved Dynamic Components
    sketchup
    6 Posts 3 Posters 1.7k Views
    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.
    • T Offline
      theflanker
      last edited by

      I want to make this component lock to one of 4 different widths, and about 10 heights between 300mm and 2700mm, using the scale tool.
      Is there a way to make a text box come up when u scale to make sure its locking to the length you want?
      and can you limit the inputs in the attributes text box?


      10-11-18 dynamic wall panel.skp

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

        I think you could use NEAREST(testVal, v1, v2, v3, v4), which picks a value from the list [v1, v2, v3, v4, ...] that is nearest to testVal.

        Error 404 (Not Found)!!1

        favicon

        (sketchup.google.com)

        Hi

        1 Reply Last reply Reply Quote 0
        • T Offline
          theflanker
          last edited by

          thanks for the help,
          but i cant work out what testVal is.
          I want it to snap to either 370, 450, 820, or 900. but it always snaps to the value that is closest to the testval value.
          any ideas? do i make testval some sort of x variable?

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

            Hi Sam,

            If you want the component to scale along the X axis... then add the LenX attribute and enter this formula.

            LenX: =NEAREST(CURRENT("LenX"), 370, 450, 820, 900)


            829.png

            Hi

            1 Reply Last reply Reply Quote 0
            • T Offline
              theflanker
              last edited by

              Thanks Jim,
              I think im nearly there. it will snap to all the widths now, but to get it to snap to the 900 of 820 one you have to scale out to about 3000 or 4000 units. if you scale the component to approx 900 it will snap back to 450.... not sure why it would be doing this.

              1 Reply Last reply Reply Quote 0
              • A Offline
                aircooled
                last edited by

                The value of LenX which is returned is in inches, even when the model is in centimetres. So you need to compare with LenX * 2.54 e.g.:

                =NEAREST(CURRENT("LenX")*2.54,350,450,820,900)

                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