Announcements

Between mid-October and November, the content on AREA will be relocated to the Autodesk Community M&E Hub and the Autodesk Community Gallery. Learn more HERE.

getOpenFileName default path only if no prior history

getOpenFileName default path only if no prior history

Anonymous
Not applicable
275 Views
2 Replies
Message 1 of 3

getOpenFileName default path only if no prior history

Anonymous
Not applicable
Hi all !

I was wondering if there is a way to set a default path only if it's the first time the user use the dialog and use the last path the other times.
I know I can set a filename with just the path but it's a bit overwhelming to always start from the default path and use the history to get to the last used path.

Thanks !
0 Likes
276 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable
Write the last used path out to an ini file, using setinisetting, try() and load via getinisetting , and if that fails, use the default path
0 Likes
Message 3 of 3

Anonymous
Not applicable
Ah right thanks ! But I ended writing it in the registery, and ini file would probably have been cleaner thought!
0 Likes