• Login
sketchucation logo sketchucation
  • Login
ℹ️ GoFundMe | Our friend Gus Robatto needs some help in a challenging time Learn More

DC multiple different OnClick movements

Scheduled Pinned Locked Moved Dynamic Components
sketchup
5 Posts 2 Posters 7.1k 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.
  • J Offline
    JQL
    last edited by 13 Jul 2017, 20:42

    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 14 Jul 2017, 11:03

      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
      • J Offline
        JQL
        last edited by 14 Jul 2017, 11:26

        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
        • J Offline
          JQL
          last edited by 14 Jul 2017, 13:48

          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
          • J Offline
            JQL
            last edited by 14 Jul 2017, 17:18

            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
            1 / 1
            • First post
              1/5
              Last post
            Buy SketchPlus
            Buy SUbD
            Buy WrapR
            Buy eBook
            Buy Modelur
            Buy Vertex Tools
            Buy SketchCuisine
            Buy FormFonts

            Advertisement