sketchucation logo sketchucation
    • Login
    πŸ€‘ SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

    [request] Start Sketchup with activated Plugin

    Scheduled Pinned Locked Moved Plugins
    4 Posts 3 Posters 237 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.
    • BurkhardB Offline
      Burkhard
      last edited by

      Can we start Sketchup in that way?

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

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

        Yes.

        Now please explain what you want to do... πŸ˜’

        NOTE:
        If you had a tool activated by the code TIG.doit() in a file called TIG-doit.rb in the Plugins folder, then you can write a short script in the Plugins folder called say zzz_TIG-doit_activator.rb containing the [pseudo] code:
        require "TIG-doit.rb" TIG.doit() if Sketchup.active_model
        I named it with leading z's so that it auto-loads late on, in case any other scripts are trying also to launch their own tool at startup !
        If you wanted to launch a native tool then use something like:
        Sketchup.send_action("selectSelectionTool:") if Sketchup.active_model
        which changes the default 'Line' tool to become 'Select'.
        You could also add a couple of Observers to the Sketchup App... to redo this should the user Open or make a New SKP, when the .rb won't auto-reload...

        TIG

        1 Reply Last reply Reply Quote 0
        • T Offline
          Trogluddite
          last edited by

          @tig said:

          If you wanted to launch a native tool then use something like:
          Sketchup.send_action("selectSelectionTool:") if Sketchup.active_model
          which changes the default 'Line' tool to become 'Select'

          πŸ˜„ Thanks TIG. I've always been mystified why they chose 'Line' as the default tool - 'Select' seems much more sensible to me; so now I have made my first ever .rb file (though I think it will be 1000 years before there's any chance I'll rival you, ThomThom, Fredo et al.!!).

          1 Reply Last reply Reply Quote 0
          • BurkhardB Offline
            Burkhard
            last edited by

            Thanks TIG. No need for me to explain this since I'm not a coder and this is all mystical for me.
            It was a question in general for an idea a client have.
            If they want me to realize, I will take a look for someone with professional background.

            Btw. I saw in the API the values for send_action. But, is there a list of AutomationID available? ( like save 57603 )

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

            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