jackalvn wrote:TIG wrote:Usage:
export_by_layer(type)Typed in Ruby Console or another script...
Exports everything in the active Model into a set of files 'by layer',
put in the Model's folder named with the 'layer_name' as a suffix.
The argument 'type' sets the file export type...
e.g. type = 'obj' [as a string inside '' or ""] other types possible e.g. 'dxf'
Faces with their Edges on another Layer take those Edges with them...
For example:
export_by_layer('obj')export_by_layer.rb
Firstly, thanks for your work in this problem.
I wonder how it works. I don't see the icon or something like that in Sketchup menus or everywhere to active it. Could you give some tutorials step-by-step?
Secondly, I see there are few choices when exporting Sketchup into CAD while still keeping layers alive, especially when export sections.
Any help for this thing?
You sort of answered your own question in the quoted text.
Usage: [ruby]export_by_layer(type)Typed in Ruby Console or another script...[/ruby]
You can write a script to run it with a menu item etc BUT the simplest way is to open Window > Ruby Console and type in
export_by_layer(type) + <enter>
Exports everything in the active Model into a set of files 'by layer',
put in the Model's folder named with the 'layer_name' as a suffix.
The argument 'type' sets the file export type...
e.g. if type = 'obj' [as a string inside '' or ""] other types possible e.g. 'dxf', 'dwg'
Faces with their Edges on another Layer take those Edges with them...
For examples:
export_by_layer('obj') or export_by_layer('dwg')The files produced are named 'ModelName__Layer_Layer0.dwg', 'ModelName__Layer_DOORS.dwg', 'ModelName__Layer_WALLS.dwg' etc....
Exporting 3D keeps everything Layered in CAD, in 2D it does not work the same way...