sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    2 separate onClick function

    Scheduled Pinned Locked Moved Dynamic Components
    sketchup
    4 Posts 2 Posters 4.1k 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.
    • M Offline
      MvanDijk
      last edited by

      Hi,

      In the attached skp file are 4 panels which are folding and sliding type.
      On 1 click , the first set will fold and the 2nd set follows by sliding.
      Now I need the 2nd set to fold as well once I click again.
      Tried to create a double click function by semicolon separation, but this results in the 2 foldings just at the same time instead of on each separate click.
      Is there any way to solve this.

      in short:
      1st click : open 1&2 + slide 3+4 (as in attachment)
      2nd click : open 3&4 right next to 1&2
      3rd click : close 3&4 again
      4th click : close 1&2 + slide 3&4


      Double folding.skp

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

        folding example

        if you nest the sections into one another, then change the driven attribute value to effect each part. Note axis change on part 3


        folding example.skp

        1 Reply Last reply Reply Quote 0
        • M Offline
          MvanDijk
          last edited by

          Thank you pcmoor,

          Thank you for taking the time to look into this.

          The end result is correct, all 4 panels next to each other in a vertical stand.
          However the action in between is suppose to be different.

          taking your example:
          at 1st click mat 1 and 2 should only fold , mat 3 and 4 must follow sliding (no fold).
          at 2nd click mat 3 and 4 should fold next to 1 and 2.

          So instead of 2 actions at 1 click (actually 4 in your case), I need 1 action at each different click.

          Then from there on I can reverse for closing again.

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

            Bed with two folds that have independent onclicks, with a test to check position of the first.
            the move is tied to the second fold.

            It may be enough or give you some ideas

            You could consider a Set function for conditions, required if are placing the animate in the parent


            folding example.skp

            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