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

How to undo from ruby?

Scheduled Pinned Locked Moved Developers' Forum
5 Posts 2 Posters 1.4k 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.
  • C Offline
    confitex architure
    last edited by 28 May 2008, 14:45

    Hello,

    I'm trying to find a clue in order to allow to undo multiple actions that occure from a ruby script, during the execution of this script.
    I don't know if it's clear enough? Imaginea user starts a script that insert component one by one, with coordinates inserted by the user (obviously, the user is just me...), but I realise I was wrong two steps ago... so I want to go back and restart, even get my variables back as it was before.

    Who can help?

    1 Reply Last reply Reply Quote 0
    • J Offline
      Jim
      last edited by 28 May 2008, 21:51

      Emmanuel,

      You'll want read about and use:

      
      Sketchup.active_model.start_operation "Operation name"
      ...
      Sketchup.active_model.commit_operation
      
      

      and

      
      Sketchup.undo
      
      

      Hi

      1 Reply Last reply Reply Quote 0
      • C Offline
        confitex architure
        last edited by 30 May 2008, 14:44

        Thanks Jim,
        I'll look further for that.

        1 Reply Last reply Reply Quote 0
        • C Offline
          confitex architure
          last edited by 7 Jun 2008, 15:31

          Hi, Again...
          But the start/commit_operation do not undo the variable that changes?
          It only undo "actions" on the screen, on the model.
          Then is there a way to act on the variable and undo the new value?

          1 Reply Last reply Reply Quote 0
          • J Offline
            Jim
            last edited by 8 Jun 2008, 12:58

            @unknownuser said:

            Hi, Again...
            But the start/commit_operation do not undo the variable that changes?
            It only undo "actions" on the screen, on the model.
            Then is there a way to act on the variable and undo the new value?

            Emmanuel,

            That is sort of an odd request. Can you elaborate on what you want to do, or post some code?

            Hi

            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