公告

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
不适用
277 次查看
2 条回复
1 条消息(共 3 条)

getOpenFileName default path only if no prior history

Anonymous
不适用
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 个赞
278 次查看
2 条回复
回复 (2)
2 条消息(共 3 条)

Anonymous
不适用
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 个赞
3 条消息(共 3 条)

Anonymous
不适用
Ah right thanks ! But I ended writing it in the registery, and ini file would probably have been cleaner thought!
0 个赞