[request] Start Sketchup with activated Plugin
-
Can we start Sketchup in that way?
-
Yes.
Now please explain what you want to do...

NOTE:
If you had a tool activated by the codeTIG.doit()in a file calledTIG-doit.rbin the Plugins folder, then you can write a short script in the Plugins folder called sayzzz_TIG-doit_activator.rbcontaining 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 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.!!). -
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 )
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better π
Register LoginAdvertisement