ExportWithOrigin macro

Hi. I do need to create a macro that it is allowing me to export selected curves in Rhino as DXF file but the geometries needs to be inverted at export time and to be able to pick the lowest-left point of the geometry as the 0,0 origin point.

I do created the following macro:

! _Mirror _Pause _Copy=No _Pause _Pause _Enter _SelLast _Enter '_ExportWithOrigin _Pause _Enter _Undo

but the problem is that I can’t find a way to make this to be able to select the origin point or to set-up automatically to the bottom-left corner of the geometry. Also I can’t find a way to specify the automatic DXF format.

It is a better way to mirror automatically along the middle X of the selected geometry?

This feels like a script, I’ll see if I can make something that works if someone else does not get there first…

See if this does what you need - quick and dirty but it seems OK-

AutoExportWithOrigin.py (630 Bytes)

To use the Python script use RunPythonScript, or a macro:

_-RunPythonScript "Full path to py file inside double-quotes"

-Pascal

Thank you very much. It is working.

Hi. Unfortunately I do found a bug. I tryed to export the gometry from the attached file and the script mirrored the geometries along the X axis and not along Y axis as I do expected. Please, it is possible to fix this issue? Thank you.

Door_2040_Hinges_template.3dm (28.0 KB)

Hello- it looks correct here…?

-Pascal

Looks same here, bet meantime I fixed. I just changed the Mirror axis in script. I actually need to mirror along the Y axis.