Running Sketchup from Python

Good day,

I am looking for information regarding the possibility to run sketchup from a python application.
Suppose I have a python GUI that lets me choose the coordonates of two points A & B, a length and a thickness.
I would like to click on a pushbutton (for example) in the GUI and see in sketchup the designed beam.

Thanks a lot for any kind of information that would help to go farther in this subject.

Jim

SketchUp does not have a built-in external automation interface or a way to feed external data. In principle, one could develop such an interface using either the SketchUp Ruby API or the C++ SDK, but I don’t know that anyone has done so or done so compatibly with Python. Would it be possible for you to write a Ruby plugin or to use other built-in features such as Dynamic Components to do what you need?

1 Like

there is sketchup.exe -RubyStartup C:\path\to\script.rb
script.rb could be written by and launched from python but i needs to be in ruby.
from the ruby you can open a socket to reply back if needed…
john

1 Like

Is it just for your own interests, or to ship something to users? You can use Sikuli, which does UI automation, and can interact with the UI via Jython or JRuby (J == Java) for internal use.

1 Like