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

[Question] multi document interface and Tools

Scheduled Pinned Locked Moved Developers' Forum
7 Posts 5 Posters 613 Views
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.
  • A Offline
    Aerilius
    last edited by 22 Dec 2011, 19:13

    When a user selects another opened SketchUp document, is still the same tool active or does each model have its own "active" tool?

    I would have expected that the same tool stays active, but I'm not sure because the API has Model.**tools** instead of Sketchup.tools.

    1 Reply Last reply Reply Quote 0
    • T Offline
      TIG Moderator
      last edited by 22 Dec 2011, 19:32

      I think a PC has independent versions of SUp app for each SKP window, whereas a MAC has multiple windows of one version of the SUp app for a collection of SKP windows; I stand to be corrected.
      😕

      TIG

      1 Reply Last reply Reply Quote 0
      • D Offline
        driven
        last edited by 22 Dec 2011, 20:52

        on mac I can have multiple identical environments with independent tool and user preference selections.
        Toobars, UI window are either shown in both or hidden in both, but can be selected in just the active one.
        john

        learn from the mistakes of others, you may not live long enough to make them all yourself...

        1 Reply Last reply Reply Quote 0
        • A Offline
          Aerilius
          last edited by 23 Dec 2011, 00:01

          Ok, thanks!

          Is there a way to keep track of the change of the active document? I didn't find an appropriate AppObserver and I guess this wouldn't trigger a onActiveToolChanged Observer or the deactivate method of a Tool?

          1 Reply Last reply Reply Quote 0
          • J Offline
            jeff hammond
            last edited by 23 Dec 2011, 00:18

            @aerilius said:

            ... or the deactivate method of a Tool?

            not the last part at least..
            say (on mac) i activate the line tool then click a start point..
            then i switch to a different su window and activate the circle tool.. click a start point for it..
            go back to the original window and i click once to finish the line..
            then to the 2nd window to click my radius point and complete the circle..

            point being, the tools don't deactivate (at least my interpretation of that word) when going to another window.

            dotdotdot

            1 Reply Last reply Reply Quote 0
            • D Offline
              Dan Rathbun
              last edited by 23 Dec 2011, 09:53

              @aerilius said:

              When a user selects another opened SketchUp document, is still the same tool active or does each model have its own "active" tool?

              Obviously, on PC, where the two Sketchup processes are separate and independent, each has it's own Ruby process, and therefore the each application (which can only have a single model open,) is independent. The Tools stacks are different.

              On Mac, if two models are open under the MDI interface, each of them have their own active model ( a Sketchup::Model instance,) and therefore each of them has their OWN tool stack, referenced via Sketchup.active_model.tools(); and their own active tool, referenced via the Sketchup.active_model.tools().active_tool_id() method.
              This ALSO means that an model observer needs to be attached to EACH of the model instances to "watch" them independantly, as well as attaching a tools observer to each of the model's tool stacks.

              However, the API does NOT yet have a Sketchup::ModelSet collection class, but I HAVE filed an API feature request that one be added to the API, as well as onFocus() and onBlur() callbacks for the Sketchup::ModelObserver class. (During the v8.0 initial release beta cycle. Beta Testers can refer to FR#0105 and FR#0173.)

              I'm not here much anymore.

              1 Reply Last reply Reply Quote 0
              • A Offline
                Aerilius
                last edited by 23 Dec 2011, 10:06

                Thanks, that's very helpful (and I was also wondering why such observers don't exist, good feature request).
                I'll have to consider this for my webdialog callbacks.

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

                Advertisement