I’m using the nest feature of RhinoCam, it let’s me export 60 sheets of nested parts to files but only to .3DM which will mean nothing to the laser cutter operator. I contacted MecSoft and they suggested contacting McNeel, thought I’d try here first.
"You can check with McNeel support to see if they could come up with some sort of a script that can take the 3dm files and convert it to dxf’s without having to convert each file manually.
Alternatively you can check if they can help you with a script that can export each layer of the committed nest to a separate Dxf from Rhino. This might be more doable I think."
Hello - see how this script works for you - to run it save and then drag and drop onto Rhino, this will add an alias that will run the script much like a command"
ExportLayers
You’ll want to do one export manually, so to speak, to set up the dxf options, then this script should just use the same. I just added dxf, but did not test much yet… =)
Here’s my export DXF by layer script. BatchExportDXFByLayer.py (1.7 KB)
Note that before you run the script, do one “dummy” export manually to set the ACAD export scheme, as the script will use the most recently used scheme.
Hi all!, I know that I almost have the solution but I am stuck
I need to export a single DXF file with all the selected curves (not a single file for each curve or each layer).
I think that is more simple that your .py codes but I can not find the solution. Maybe my problem is using the for when I want directly all the curves but rs.SelectObjects(sel_obj) causes error.
Hi I need it as a Python Script, exactly like the example but exporting all curves in one DXF file (my need is a little more complicated but with this help I think I will able to solve it)
That’s it! Thank you so much, I really apreciate it .
In fact, maybe I was focus and tired and I didn’t see the mistake but your functional solution is almost the same that the test I did (I think), seems that rhino python debugger is a little poor for that…
Another question…
Is it possible to compare the current documentPath with Rhino.Options.DefaultFileDialogDirectories.ExportDirectory?
I mean, if documentPath is not equal to Rhino.Options.DefaultFileDialogDirectories.ExportDirectory (parent path, it could be interesting to detect\ in order to extract a subpath to compare) then use documentPath to export files, else use the last used, stored in defailtFileDialogDirectories…
In Rhino _Options menu, advanced, there is the following path Rhino.Options.DefaultFileDialogDirectories.ExportDirectory
and I tought that this path is updated every time you export selected curves but only updates every time you open a Rhino file.
My goal is use the script to export a DXF file (solved) but compare the path from my rs.DocumentPath() and the path of the last exported in order to avoid mistakes saving the DXF files in a wrong path.
If last exported path (subpath) = rs.DocumentPath() then open last exported path, else open document path
This optimizes when you want to save multiple DXF curves with different names and do not want to select every time the subfolder. Same process when you use export selected curves from rhino option.
Another option is after exporting a DXF file to save a txt in a specific path storing the string of the path, and every time I use the script compare the string included inside the txt file, but I think that this could be solved an easier way…
i would like to extract name of file from a block attribute, the idea is to export all parts i set for quotation as an idividual dxf. I already extract info from block with testexportblockattributes for my BOM. But i need to speed up my process of exporting each file for laser cutting.typical file
I found this in my library - it does not extract a name from a block, it simply asks you for a main file name and then numbers each group exported with that name plus a sequentially numbered suffix. Individual non-grouped objects are also exported as individual files.