Export eps or 2D dxf or 2Ddwg


#1

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


Is there any api for 2D DWG export in Sketchup 2016?
#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?


#3

Thanks tomtom!
One more question pdf, doesn’t work too ? in fact no vector format is working ? (sorry for english mistake)


#4

PDF export is missing from Windows, while it do work under OSX.

3d vector should work, DXF, DWG etc. But no 2d.


#5

Thanks TomTom, I will use Sketchup.send_action 21237 and put a sone on my “enter” key.

OR ( and this is the master plan :smile: )

  1. replace the sheet of the watercolorbot.com by my keyboard
  2. replace the pencil by a reverse pen
  3. in ruby Sketchup.send_action 21237
  4. 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”


#6

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 )


#7

You could try to send key-presses that automates the UI. Fragile, though… not pretty at all.


#8

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.


#9

Awesome !! We install and use Sikuli and it’s work’s well !!. Tanks you Chris !


#10

Great, glad that helps!


#11

Did 2D DWG export ever make it into the API?