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

    Shut down automaticly

    Scheduled Pinned Locked Moved Developers' Forum
    4 Posts 4 Posters 758 Views 4 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.
    • BurkhardB Offline
      Burkhard
      last edited by

      I have another question.
      Remember the calc.rb can be open from the Plugins menu.
      But if I close Sketchup the calculator does not automaticly close with.
      Is this fiasible ( viable,contrivable or whatever )?

      Burkhard

      [http://www.ia-plus.de(http://www.ia-plus.de)]

      1 Reply Last reply Reply Quote 0
      • TIGT Online
        TIG Moderator
        last edited by

        @burkhard said:

        I have another question.
        Remember the calc.rb can be open from the Plugins menu.
        But if I close Sketchup the calculator does not automaticly close with.
        Is this fiasible ( viable,contrivable or whatever )?
        Burkhard

        You could make an observer for the model (v6 only). It would be made by the calc.rb script - if you open the calculator the observer is added to the model. It then watches for when the model closes... and removes itself and closes the calculator if it's open ?

        I haven't got an idea how to do it, BUT it should be do-able...

        TIG

        1 Reply Last reply Reply Quote 0
        • A Offline
          azuby
          last edited by

          I think, you're talking about this script:
          http://www.crai.archi.fr/rubylibrarydepot/ruby/calc.rb

          I can't image observing the calculator from within Sketchup Ruby. The UI.openURL method seems to start a non-Ruby thread, so the call returns immediately to next step in Ruby script. Because of several problems using Ruby threads (green threads), I wouldn't use them (Sketchup freezes).

          An idea would be using the WebDialogs and embed a Javascript calculator. The WebDialog windows are observerable, they can react on several events and in combination with a model observer you can hide the window when opening a new model. If you close Sketchup, the WebDialog windows also will be closed.

          azuby

          *error initus :: Blocks | CurrentDate | d/Code | extensionmanager | FFlipper | HideEdges | MeasuredArea | ModelHistory | PluginsHelp | PronButton | SAWSO | SCP | SU²CATT

          Bad English? PM me, correct me. :smile:**

          1 Reply Last reply Reply Quote 0
          • J Offline
            Jim
            last edited by

            @burkhard said:

            I have another question.
            Remember the calc.rb can be open from the Plugins menu.
            But if I close Sketchup the calculator does not automaticly close with.
            Is this fiasible ( viable,contrivable or whatever )?

            Burkhard

            On Windows, you can use AppObserver.onQuit to set up the observer, and WIN32API to find (by name) and close the calc.exe window.

            See my Ruby Toolbar plugin for using WIN32API window functions. I learned it from SketchyPhysics creator Chris Phillips.

            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