Setting the DefaultPath in a FilePath Data node

Hi,

For my script project, I need the user to choose a family to load. When I test this script, the FilePath browser window opens to the last path that was accessed.

When the user presses the “File Path” button, I would like the browser to open to a directory above the Revit families sub-directories (the directory in the “Directory Path” node). The node network below will display the directory I want in a help bubble, but the browser does not open to that directory.

Could you point me to an example of a node network that does this?

Thank you for your time.

I dont know if this would work but you can also try to set Directory path as a string. This way it may not open a random location but stick to the decided path.

Thank you, emrullah.yildia.

I tried it out but got the same behavior as before.

I appreciate your help.

1 Like

You might be able to use the UI.Pather node from crumple and alter the python within to open to a default path.

1 Like

The directory path doesn’t remember the existing path until Dynamo 2.17 (or thereabout - check the release notes).

If you want this behavior you’ll need to implement your own UI or another UI tool (i.e. Datashapes UI++ nodes).

Thank you, Jacob. That may well be the problem. I am using Dynamo 2.12 at the moment. I will look into this further.

1 Like

Hi Jacob.

I am now using 2.16. The updates to remembering paths are in the release notes to this version.

But I continue to see the same behavior. A String or File Path node connected into the defaultPath input has no effect on the location that opens when I click the File Path button in the Multi Input UI ++ window. It does list the previous file location that I accessed.

I am now trying to open and close a txt file in a folder at the top of the library folder hierarchy to get the FilePath Data node’s defaultPath reset to this convenient folder.

Might be best to provide this as a hard coded string then. Means you can not are readily update it, but that should work fine for annual deployment or version configuration.

Generally that will open the last working directory to my knowledge. Typical windows behavior, although it can likely be altered with an optional argument I’m guessing.

A hard coded string as a string node or a code block has not made a difference. I have to shelve this and move on to other things.

Thank you everyone for your help.