Showing results for 
Search instead for 
Did you mean: 

Opening files


Hi all,


I am working in NX11. I am trying to customize how where i open files from. Every time I open an existing file the browse directory starts me at the last place exported to or the last place i posted toolpaths. This happens for every instance where I am trying to put files in locations or take files from locations. How do I customize this so my file directory opens from the same place everytime? Any help is great!






Re: Opening files

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

If you are using a Windows OS, the file open dialog is controlled more by Windows than NX. Below is a link showing how you can customize this dialog.

Re: Opening files

Siemens Phenom Siemens Phenom
Siemens Phenom


You can set this with the Open C function UF_UI_set_dialog_directory(), or the .Net wrapper for this method, but note that it only controls the setting the first time that the dialog opens after you set it.  Then dialog memory kicks in, and the next time it uses the dialog memory setting. could create a simple journal and tie it to a button, so that all you had to do was click the button and all of your preferred directories would be reset.


For example, this code sets just two of the directories - there are dozens of options:


Option Strict Off
Imports System
Imports NXOpen
Imports NXOpen.UF

Module set_directories

   Dim theSession As Session = Session.GetSession()
    Dim theUFSession As UFSession = UFSession.GetUFSession()


Sub Main()


   theUFSession.Ui.SetDialogDirectory(UFUi.DialogDirId.PartDir, _

   theUFSession.Ui.SetDialogDirectory(UFUi.DialogDirId.IgesExportDir, _

End Sub


End Module


To see the long list of possibilities, you will need to open the Open C Reference, navigate to the UF_UI chapter, find the UF_UI_set_dialog_directory function, then under that, click on the link to the UF_UI_dialog_dir_id_t enum. 


Or, you can also see the possible values in the .Net Reference under UFUi.DialogDirId Enumeration, but it will only be the list of names - there are no explanations.