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

    Trigger ruby on SU8 model changes

    Scheduled Pinned Locked Moved Plugins
    3 Posts 2 Posters 185 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

      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
      • thomthomT Offline
        thomthom
        last edited by

        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

          Thanks it helped.

          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