sketchucation logo sketchucation
    • Login
    โ„น๏ธ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    Can Plugin Script Run while using other tools?

    Scheduled Pinned Locked Moved Developers' Forum
    5 Posts 3 Posters 148 Views 3 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.
    • renderizaR Offline
      renderiza
      last edited by

      Hi, I have an idea for a plugin that will report your actions per minutes while modeling so that you can analyze your performance.

      Problem is that I want the plugin to still run its code even though you selected other tools.

      Is this possible?

      [url=https://www.sketchupcode.com/:z3kqsidd]My Extensions ...[/url:z3kqsidd]

      1 Reply Last reply Reply Quote 0
      • thomthomT Offline
        thomthom
        last edited by

        "actions"? You mean like a ToolsObserver?

        Provided you do as little as possible and don't modify the model you'd probably be fine.

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

        1 Reply Last reply Reply Quote 0
        • renderizaR Offline
          renderiza
          last edited by

          Problem is that if a load my APM plugin as a tool and then use the push pull or selection tool my plugin is deactivated.

          By Actions I mean the plugin will report various thing like;

          How much time have you spend idle without moving mouse.

          How many clicks have you done...even categorize by what you clicked maybe.

          How many time you used certain tools.

          And So on...

          This will probably start by counting your clicks but as time passes will add other actions as mentioned before.

          This might be useful for monitoring how fast you work. The idea for this came from me playing Starcraft 2 ๐Ÿ’š

          Cheers!

          [url=https://www.sketchupcode.com/:z3kqsidd]My Extensions ...[/url:z3kqsidd]

          1 Reply Last reply Reply Quote 0
          • Dan RathbunD Offline
            Dan Rathbun
            last edited by

            @unknownuser said:

            Problem is that if a load my APM plugin as a tool and then use the push pull or selection tool my plugin is deactivated.

            No, only your plugin's Tool instance is deactivated.
            Your plugin's module can have observer class instances that watch whatever they are attached to.
            See the the various descriptions of observers in the API.

            @unknownuser said:

            By Actions I mean the plugin will report various thing like;

            How much time have you spend idle without moving mouse.
            How many clicks have you done...even categorize by what you clicked maybe.

            Not likely feasible, as only YOUR tools can log actual mouse clicks. Logging other people's tools and native tools are difficult.

            However... IF a tool uses tool states, you might log when that happens. But state numbers are not consistent between all native tools. ANd do not work for Ruby tools.

            @unknownuser said:

            How many time you used certain tools.

            That one would be easy using a ToolsObserver and logging when the active_tool changes.

            BUT.. this only works for Native tools. The ToolsObserver just reports 50001 (ie the same integer,) for all Ruby tools, and "RubyTool" (the same string name,) for all Ruby tool names.

            Are you aware that SketchUp writes an Undo log file while it runs?
            Check your temporary directory.

            Sometimes that is a good way to see what happening.

            I'm not here much anymore.

            1 Reply Last reply Reply Quote 0
            • renderizaR Offline
              renderiza
              last edited by

              Thank you both for help

              I think I will not work on that plugin idea for the time being.

              Cheers!

              [url=https://www.sketchupcode.com/:z3kqsidd]My Extensions ...[/url:z3kqsidd]

              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