Hi all,
I try several way to export an 2D dxf or 2D dwg or a eps with the api of Sketchup pro 2014 MAC 14.1.12.83. I can export 3D dwg or dxf, 2D png but I don’t find a way to do it.
Sketchup.active_model.export ‘/Users/DenisBolomier/Desktop/toto.eps’, false
false
Sketchup.active_model.export ‘/Users/DenisBolomier/Desktop/toto.eps’, true
false
Sketchup.active_model.export ‘/Users/DenisBolomier/Desktop/toto.DWG’, false
true
Sketchup.active_model.export ‘/Users/DenisBolomier/Desktop/toto.dxf’, false
true
Sketchup.active_model.active_view.write_image “/Users/DenisBolomier/Desktop/test.jpg”
true
Sketchup.active_model.active_view.write_image “/Users/DenisBolomier/Desktop/test.eps”
false
tt_su
August 26, 2014, 1:58pm
2
Yea, I think that’s missing from the API I’m afraid. I believe we have an issue logged for that.
pokes @ChrisFullmer I’m not making it up when I say we have an issue already, right?
Thanks tomtom!
One more question pdf, doesn’t work too ? in fact no vector format is working ? (sorry for english mistake)
tt_su
August 27, 2014, 8:59am
4
PDF export is missing from Windows, while it do work under OSX.
3d vector should work, DXF, DWG etc. But no 2d.
Thanks TomTom, I will use Sketchup.send_action 21237 and put a sone on my “enter” key.
OR ( and this is the master plan )
replace the sheet of the watercolorbot.com by my keyboard
replace the pencil by a reverse pen
in ruby Sketchup.send_action 21237
in ruby send to the watercolorbot webservice the action to push and release the enter key of my keyboard, …
let’s go develops the “hand-made API of Sketchup”
1 Like
In fact I discover that send_action is asynchronous !
arrrrrg, bot is the last chance to escape 1000 drawing conversion.
(3D vector export is pollute by showing all the edge )
tt_su
August 27, 2014, 11:59am
7
You could try to send key-presses that automates the UI. Fragile, though… not pretty at all.
We use auto-it or sikuli for Sketchup automation sometimes for testing purposes. Its fragile from version to version. But once you get good at it, its pretty easy to keep updated.
1 Like
Awesome !! We install and use Sikuli and it’s work’s well !!. Tanks you Chris !
Did 2D DWG export ever make it into the API?
2 Likes