Problem with Inventor's FileDialog object

Problem with Inventor's FileDialog object

rschader
Advocate Advocate
692 Views
2 Replies
Message 1 of 3

Problem with Inventor's FileDialog object

rschader
Advocate
Advocate

Can't seem to find an answer for this problem I am having. I have an addin I am writing that uses Inventor's FileDialog to select macros to run (the macros are written in Python). I use the InitialDirectory option to set the default location of where I store my macros. The problem is, after executing the macro, the next time I go to do anything which opens a FileDialog (Open, Place Component, etc.), the InitialDirectory of that dialog is still set to the directory I selected my macro from. I thought perhaps I could read and store any value stored in the InitialDirectory before changing it, but the value is null, and clearing it afterwards does not help. Does anyone know of a method whereby I can still use Inventor's FileDialog object in my addin and NOT mess with the directory Inventor uses the next time it uses the FileDialog to open or insert a file, or do you think I will have to resort to using an MS native file dialog instead of Inventor's?

0 Likes
Accepted solutions (1)
693 Views
2 Replies
Replies (2)
Message 2 of 3

xiaodong_liang
Autodesk Support
Autodesk Support
Accepted solution

Hi,

 

Context of OnFileSaveAsDialog would tell the "InitialDirectory" which is the path of the last saved. I think this is helpful to you to initialize your own dialog.

0 Likes
Message 3 of 3

rschader
Advocate
Advocate

Yup. Did that a couple days after posing my quesiton here. Not sure why I even bother asking questions on these boards, hardly ever get a response, let alone a timely one.

0 Likes