Read export directory from options.defaultfiledialogdirectories

Hi @Vicente_Durá,

below python sample seems to print the path which is set in Advanced Options:

Rhino.Options.DefaultFileDialogDirectories.ExportDirectory

import Rhino
import scriptcontext
import rhinoscriptsyntax as rs
import System

def GetLastExportDirectory():
    try:
        rh_id = Rhino.RhinoApp.CurrentRhinoId
        settings = Rhino.PlugIns.PlugIn.GetPluginSettings(rh_id, False)
        s = settings.GetChild("Options").GetChild("DefaultFileDialogDirectories")
        d = s.GetString("ExportDirectory")
        
        # only return path if it exists
        if System.IO.Directory.Exists(d):
            return d
    except Exception as ex:
        print ex

def DoSomething():
    print "ExportDirectory:", GetLastExportDirectory()
    
if __name__ == "__main__":
    DoSomething()

to get the document path for comparison you might use: rs.DocumentPath().Note that the document must be saved before or it returns None.

_
c.