I’ve not figured out why or how to fix. When I export a mesh as *.stl, it works just fine, but always saves in the directory of the PREVIOUS export, not the current directory. So when I go to 3D print, I have to find the previous directory and then move to the proper one.
Is there a command/option to use the CURRENT directory for exports, and not the prior one?
Would make my life easier, …but then I’m learning about where to look.
there is a command SetWorkingDirectory which allows to define the default path used upon export.
Alternatively you might paste the script below into a button command. If your document has been saved, it sets the working directory to the file path and runs the export command:
! -_RunPythonScript (
import os
import rhinoscriptsyntax as rs
def ExportToDocPath():
path = rs.DocumentPath()
if path: rs.WorkingFolder(os.path.dirname(path))
rs.Command("_Export", False)
ExportToDocPath()
)