Ruby plugin to standalone application
-
Hello sketchup community,
I developed a plugin for sketchup, in order to assemble some parts in a structure based on some parameters given by an CVS file.
My program interface is based on a webdialog that allows the communication between ruby and html, javascript and php.
My question here is:
Is it possible to make my plugin run as a standalone application that uses sketchup engine for all the drawings?Due to the application's purpose, the process of opening Sketchup and run the plugin through there is not good for me..
Thank you all in advance
-
Without SketchUp you would have no user interface (other than command line).
You can look for graphics UI toolkits that have bindings for Ruby (QT, wxWidgets, Fox, Shoes).
The SketchUp engine can not be embedded, you would have to envoke SketchUp with a (platform dependend) system call and it would open the normal SketchUp application. You can also not easily control it from outside.
• You could use a separate SketchUp installation that has one ruby plugin installed that starts acting when SketchUp starts.
• You could launch a ruby script file when SketchUp starts, using an undocumented command line parameter:-RubyStartUp
• You could use SketchUp Bridge -
Not Ruby, but there is an C API for doing just that - read and write .SKP files. Made to be used by other applications who wish to implement SKP support.
-
Hello guys
Thank you for your quick answers!
Regarding them, I'm trying to use the -RubyStartup tip but I'm not figuring it out!..Where should I put it?
I thought that I had to put it in the Sketchup shortcut target field
"C:\Program Files\SketchUp\SketchUp 2013\SketchUp.exe"I'm using the last version of SketchUp, the free version.
Thanks!
-
update
I managed to launch the plugin automatically through a tip that I found of an '!autocon.rb' file.
For now, this is enough for me
Thank you all! -
@prototype said:
I thought that I had to put it in the Sketchup shortcut target field
"C:\Program Files\SketchUp\SketchUp 2013\SketchUp.exe"SketchUp Command Arguments
Following a discussion on SketchUcation, Jim came up with a list of command arguments one could use when launching SketchUp: $ Sketchup.exe [opts] [file.skp] Possible choices for [opts]: -DisableRu…
Procrastinators Revolt! (www.thomthom.net)
Advertisement