Customizing NX
How to add customizations to NX
There are a few ways to customize NX. There are legacy ways and a newer modular way of customizing. We will focus on the newer way of setting up NX for customizations. There is a file called “custom_dirs.dat” (or custom_dirs for Unix) that is nothing more then a text file of directory locations. At the bottom of this small file you will add a directory path to your customization root path. This can be any location that the machine can see. So a mapped drive on the server will work, there may be a performance hit on starting up NX if the connection is slow.
The root directory of your customizations then will have multiply directories beneath that. This directories have to be named “application, startup, udo, dfa”. All these directories are not needed just the ones you are using. So instance you have a custom NX/Open application that you want available, put that in the “application” directory. If you wrote a program that is a UDO, you have to put it in the “udo” directory. The “startup” is for special programs and menu customizations that need to be called in this time of NX starting up.
Why do we need to create this directory at all? Well for some standalone applications you technically don’t need to set this up, but then you can’t have it registered on startup, can’t use UDO’s and forget about custom menustructure and toolbars or custom dialogs.
If you don’t want to modify the custom_dirs.dat file (located in UGII_ROOT/UGII/menus or “C:\Program Files\UGS\NX 3.0\UGII\menus”) you can also set a variable to point to your own custom_dirs file. You can name it anything you want, and located it anywhere the machine has access to it. The variable you will need to set is “UGII_CUSTOM_DIRECTORY_FILE”, this can be set in the machine environment settings or in a shell that starts up NX. The shell is the best way to do this, that way you can push out or serve the NX startup script and have this or other variables set. If the location ever moves it’ll be easy to change this.
Where do my custom files go? You have custom menu files (.men) and your own toolbar (.tbr) files, you will put that in the startup directory. Custom dialog (.dlg) files go into the application directory along with your NX/Open applicaition (dll, so, sl) and custom bitmaps you use. Knowledge Fusion application (dfa or prt) goes into the dfa directory, more information on Knowledge Fusion here. The udo directory is for NX/Open UDO applications, and startup is also for special NX/Open applications that need it (for example a NX standard out window).
Conclusion, Our goal is build every custom application to resemble a core NX application. In order to accomplish customizing the menu structure to add the applications into it, building 0r customizing a coresponding toolbar, and having a native NX dialog. To do this we have to use this customizations outlined in this article. No matter you level of customization, if you use the custom_dirs approach you will have the scalability to do as little or as much as you need. Give it a try.
Directory Structure:
Application root directory (point custom_dirs here)
– startup
– application
– dfa
– udo
