I am new here ,i want to know the question “PYTHON3 WILL BE SUPPORTED?”, as i see the C is supported,if it’s possible to support python3??
I don’t think (?) SketchUp’s C SDK is based on a technology comparable to GObject that can automatically generate bindings for any language.
Apart from that, the Ruby API is for manipulating the model and the application at runtime of SketchUp, whereas the C SDK is focussed on reading/writing .skp files in external applications (not at runtime of SketchUp). The C SDK does not let you do all the same things as the API. If you are looking for an alternative to learning SketchUp’s Ruby API, the C SDK is not that alternative.
However some things can be done with the C SDK.
- If you want Python bindings for the C SDK, you would have to write them on your own, for every method.
- Or you use the existing project pyslapi (see also the examples for generating scene thumbnails etc.)
Note that such Python bindings do not support all the platforms that Python supports, only those that SketchUp supports. - Something interesting could be RubyPython which allows to access a Python interpreter from within a Ruby interpreter and mix data, function calls and classes/libraries from both. If it can be used within SketchUp’s threading limitation (I have not tested), you would still have to write a Ruby wrapper that calls your python code.
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.
There is sketchup.exe -RubyStartup C:\path\to\script.rb
script.rb could be written by and launched from python but I need to be in ruby.
from the ruby, you can open a socket to reply back if needed
Please note that the C++ SDK was removed years ago and replace with the C API.