sketchucation logo sketchucation
    • Login
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    🫛 Lightbeans Update | Metallic and Roughness auto-applied in SketchUp 2025+ Download

    DC multiple different OnClick movements

    Scheduled Pinned Locked Moved Dynamic Components
    sketchup
    5 Posts 2 Posters 7.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.
    • JQLJ Offline
      JQL
      last edited by

      Hi guys,

      I've been using DC for my arch projects for long. Nowadays just so I can manipulate some elements of my projects with the onclick function.

      I can easily animate a component and that is very handy for showing off some of my stuff to clients or even simply test if some special details are working right.

      However I have the need to animate a component in 2 different ways and can't figure out how.

      Let's say I have a 1m cube. I want to onClick on it:
      1 - once and move it .5m to on the Y axis;
      2 - Click twice and move it 1m

      So far so good. I can do this and revert to the initial position with: AnimateSlow("Movement",0,.5,1) and then set postion with Y=100*Movement

      However I cannot:

      3 - Click the third time and rotate it on the Z axis.
      4 - Click the forth time and it rotates back on the Z axis.
      5 - Click a fifth time and it's back at where it started.

      Is there a easy way to do 3, 4 and then 5?

      If there is a hard way I also don't mind... 😄

      Thanks in advance,

      João

      www.casca.pt
      Visit us on facebook!

      1 Reply Last reply Reply Quote 0
      • P Offline
        pcmoor
        last edited by

        this is probably the clearest and most simple, rather than use a load of conditional statements

        source: Jack de Moel
        https://forums.sketchup.com/t/multiple-dynamic-components-w-n-a-dynamic-component/48035/6
        Capture.PNG

        I made a cube as required based on his technique


        cube example.skp

        1 Reply Last reply Reply Quote 0
        • JQLJ Offline
          JQL
          last edited by

          Thank you very much Philip!

          I will try and give you feedback.

          www.casca.pt
          Visit us on facebook!

          1 Reply Last reply Reply Quote 0
          • JQLJ Offline
            JQL
            last edited by

            Philip,

            Here's a simple result (click gif):

            Revolving and Sliding Door.gif

            You were very helpful! Thank you very much!

            www.casca.pt
            Visit us on facebook!

            1 Reply Last reply Reply Quote 0
            • JQLJ Offline
              JQL
              last edited by

              Philip, I tried the solution you posted above, but ended up using 2 AnimateSlow on a single onClick. I didn't know one could use the semicolon to have double results from one onClick function:

              Revolving and Sliding Door.gif

              www.casca.pt
              Visit us on facebook!

              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