Showing results for 
Search instead for 
Do you mean 
Reply

Setup for custom application

Currently I am working on a custom application for NX. During development I use the UGII_USER_DIR and USER_DEFAULT environment variables in the ugii_env.dat which I set to my debug path and dll.

 

At the end of development there should be a setup which fully enables the application. Is there a universal accepted way to set my application path and dll which does not interfere with customer settings?

7 REPLIES

Re: Setup for custom application

Perhaps there is a document on deploying 3rd party apps or best practices? That would help.

Re: Setup for custom application

UGII_SITE_DIR is usually used for custom applications or custom_dirs.dat

 

The ugii_env_ug.dat file has further information and the NXOpen API Guide.

Stefan Pendl, Systemmanager CAx, HAIDLMAIR GmbH
Production: NX10.0.3, VERICUT 8.0, FBM, MRL 3.1.4 | TcUA 10.1 MP7 Patch 0 (10.1.7.0) | TcVis 10.1
Development: VB.NET, Tcl/Tk    Testing: NX11.0 EAP, NX12.0 EAP

How to Get the Most from Your Signature in the Community

Re: Setup for custom application

I don't really get it. I install into something like C:\Program Files\[Company]\[Product name] and this folder should be my UGII_USER_DIR and a dll with UserExits in this folder my USER_DEFAULT (at least these are the variables I use in my debug environment).

 

If I use the UGII_SITE_DIR approach and another custom app was installed before which did exactly this then I overwrite their settings. Same with custom_dirs.dat. If this is already configured I should not point to my custom_dirs.dat. Then it would be best to extend the existing custom_dirs.dat.

 

If I develop a custom app that should be installed for different customers with more than one machine, I need a strategy which fits all scenarios. Do I really have to write a new program that checks all possible ways to setup my folders to be sure no customer setting is overwritten? How is that usally done, I cannot be the first one to go done this road? 

Re: Setup for custom application

I have many applications sharing the UGII_SITE_DIR structure.

 

Generally I put my DLLs into the UGII_INITIAL_UFUN_DIR, my bitmaps in UGII_BITMAP_PATH and the dlx files into UGII_SITE_DIR\application.

 

There is no need to put each application into a separate folder, since it makes things just more complicated.

Stefan Pendl, Systemmanager CAx, HAIDLMAIR GmbH
Production: NX10.0.3, VERICUT 8.0, FBM, MRL 3.1.4 | TcUA 10.1 MP7 Patch 0 (10.1.7.0) | TcVis 10.1
Development: VB.NET, Tcl/Tk    Testing: NX11.0 EAP, NX12.0 EAP

How to Get the Most from Your Signature in the Community

Re: Setup for custom application

 

Robin,

 

Good morning.  To avoid worrying about what else might be installed, and where it might be, just create your own custom directory.  Under your directory, put your own "startup" and "application" folders.

 

Now add one line to the custom_dirs.dat file to include your custom directory.

 

Note that this file can have a different name, but the docs refer to it as custom_dirs.dat.  It should be defined by UGII_CUSTOM_DIRECTORY_FILE.  So if your installer finds that is defined, you just have to add one line to the file.  If your installer discovers that it is not already defined, then you can define it to point wherever you like.

 

NOTE:  There is a file with a similar environment variable, UGII_UG_CUSTOM_DIRECTORY_FILE.  DO NOT MODIFY THAT ONE!.

 

Best regards,

 

Steve

 

 

 

Re: Setup for custom application

[ Edited ]

Hello Steve,

 

this seems to be the right approch for me. I put my folder in the custom_dirs.dat file and everything works as expected.

 

Is UGII_CUSTOM_DIRECTORY_FILE usually defined in ugii_env_ug.dat? Where should I search for the variable as well?

 

One thing is unclear to me: What about USER_DEFAULT? This variable points to custom dll of mine containing all user exits. Is there a corresponding variable where you can set multiple dlls as well? Or how is it usually done if you want to catch all user exits?

 

Thanks!

Re: Setup for custom application

[ Edited ]

not sure if this applies to your situation but in the past I created an environment variable

UGII_CUSTOM_DIRECTORY_FILE=C:\Program Files\Siemens\NX 10.0\UGII\menus\custom_dirs.dat

 

and in the custom_dirs.dat file I had

 

${UGII_BASE_DIR}\ugopen\SampleNXOpenApplications\Python\CustomApplication
C:\Program Files\Siemens\NX 10.0\UGOPEN\SampleNXOpenApplications\Python\CustomApplication

 

In Developer\BlockUIStyler, I also created a dialog box (CustomApplication.dlx) linked to a Python file (CustomApplication.py)

 

I don't recall needing to change anything in ugii_env.dat