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

Trigger ruby on SU8 model changes

Scheduled Pinned Locked Moved Plugins
3 Posts 2 Posters 184 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.
  • K Offline
    krisjaniszakis
    last edited by 7 Sept 2012, 11:44

    Hi,

    Is there any one who has answer to question.
    How to catch (on the fly) with Ruby script any changes(drawing, painting) that user is doing in active model.

    I basically don't care what he is doing I need to know that he is doing something to model.

    Krisjanis

    1 Reply Last reply Reply Quote 0
    • T Offline
      thomthom
      last edited by 7 Sept 2012, 12:55

      Probably use the transaction observer - triggers when something is added to the undo stack. But not that a transaction != operation. Many transactions trigger in between an operation. And it triggers A LOT!!!! So be very careful with that you do there. You can esily slow down SU. But if you set a simple boolean ( @changed = true ) you might be ok. But you should profile this to be sure.
      Also - never modify the model at these events - that's begging for a bugsplat.

      Thomas Thomassen — SketchUp Monkey & Coding addict
      List of my plugins and link to the CookieWare fund

      1 Reply Last reply Reply Quote 0
      • K Offline
        krisjaniszakis
        last edited by 7 Sept 2012, 13:32

        Thanks it helped.

        1 Reply Last reply Reply Quote 0
        • 1 / 1
        1 / 1
        • First post
          1/3
          Last post
        Buy SketchPlus
        Buy SUbD
        Buy WrapR
        Buy eBook
        Buy Modelur
        Buy Vertex Tools
        Buy SketchCuisine
        Buy FormFonts

        Advertisement