Help needed with Sketchup.exe -RubyStartup
-
Hello everyone and happy new year!
I'm trying to launch a new instance of SketchUp and have it open a plugin at start up... this what works to launch SketchUp but it doesn't run the file. Any ideas what I'm doing wrong?
For now the file is just printing a line to the ruby console.
path=File.join(__dir__, "test.rb") system('start "New SketchUp Window" "C:/Program Files/Sketchup/Sketchup 2019/SketchUp.exe" "-RubyStartup path"')Frank
-
At startup SketchUp 'always' loads all .RB files that it finds in your user's Plugins folder.
So simply having your Ruby code in a .RB file in that folder should load it, and also run any commands etc that it defines and chooses to run...
Your _dir_ is running into issues because by the time it runs it's returning nil.
What is your thinking behind this process ? -
Let me try and explain what I'm trying to do because I have a few things I'd like to accomplish... this being what I think should be the first step. Though I tend to change/modify my ideas as I work on them.
Basically I have a cabinet plugin I'm working on and one thing I'd like to do is add nesting/cut sheet/layout functionality... so basically...
- identify all the top faces of the panels (I can do this).
- make a copy of the faces before adding them to an array... still need to figure this out.
- launch a new instance of SketchUp and adding the faces from the array I copied... I was thinking of making a ruby script to do this and then launch/open a plugin to manage the nesting options.
I got the idea after finding this...
https://community.sketchucation.com/topic/139502/sketchup-command-line-switchesHopefully that's not to confusing and makes some sense.
Advertisement