How to export 2d cad with ruby

I can export cad files using ruby, but it is in 3D

The Ruby API does not have a way to do 2d export. You will need to write code for your own exporter.

BTW. You can call the built in 2D export dialog (at least on Windows) by using:
the #send_action method ( perform some action asynchronously )

Sketchup.send_action 21237

1 Like

Thanks for your reply.

Beware: this is not official API nor supported. None of send_action is guarantied to work in the future. If you’re relying on any of that and there’s no alternative official API make sure to log a feature request in the issue tracker: Issues · SketchUp/api-issue-tracker · GitHub

Yea, I’m aware of it. That is the reason why I linked the documentation where you can read similar notice: :innocent:

1 Like