Cancel
Showing results for 
Search instead for 
Did you mean: 

Re: Startup and Application Folder

Pioneer
Pioneer

Thanks for your suggestion. I figured out that "s" issue a while after I posted, but the problem still persisted.

Then I realised that NX has to be restarted every time you add a new directory in the custom_dirs.dat file, for NX to be able to automatically load all those folders at startup. Earlier, I was just adding the directory paths in the .dat file, and was trying to execute their .dll file without restarting NX, which was the main cause of the problem.

Re: Startup and Application Folder

Siemens Genius Siemens Genius
Siemens Genius

Are relative paths supported in custom_dirs.dat?

 

e.g.

 

if I have UGII_CUSTOM_DIRECTORY_FILE=c:\customizations\custom_dirs.dat

 

and custom_dirs.dat contains below to add c:\customizations\test1 and c:\customizations\test2 folders to list

----------

test1

test2

----------

 

Shriganesh

SE-Advanced
Siemens Industry Software

Re: Startup and Application Folder

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

I don't think so, but you could always add a couple ribbons or menuscript files to the "startup" subfolder & see if they work

Ken Akerboom Sr CAx Systems Engr, Moog, Inc.
Production: NX10.0.3.5 MP16/TC11.2
I'd rather be e-steamed than e-diseaseled


Re: Startup and Application Folder

Siemens Genius Siemens Genius
Siemens Genius

I figured out that relative path are supported and they are relative to current directory (not relative to location of custom_dir.dat)

SE-Advanced
Siemens Industry Software

Re: Startup and Application Folder

Siemens Pioneer Siemens Pioneer
Siemens Pioneer

Hi, 

 

I'm trying to have a toolbar linking different NXOpen dll using UGII_CUSTOM_DIRECTORY_FILE instead of UGII_USER_DIR.

 

The structure I have is: 

Directory "C:\MyToolBar".

In this directory I have: 

- application directory: containing all the bitmaps for buttons images, dlx and dll of my applications

- startup directory where I have my toolbar file

- CustomsDir.txt: containing the path to my toolbar directory : C:\MyToolBar"

Then I set up the environment variable UGII_CUSTOM_DIRECTORY_FILE to : "C:\MyToolBar\CustomsDir.txt"

 

When I launch SC, the toolbar is loaded, and each button has its bitmap but when I click on one button, the dll cannot be found "Could not find the myApplication.dll in any of the appopriate directories."

 

I am confused how the bitmaps (located at the same place as the dll) can be found but not the dlls. 

 

When I was using UGII_USER_DIR, in the tbr file, I put the full path to bitmaps and dll ($UGII_USER_DIR\application\myApplication.dll) and same for the bitmaps.

But now, as the directory is inside the custom dir file, I have no way to retrieve it and put it in the tbr file, so I don't put any, just directly the name of the bitmap and dll.

 

Am I doing something wrong ? 

 

Thanks for your help!

 

 

 

Re: Startup and Application Folder

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

You might want to look at the ENV variables in your NX session (File ->Help -> Log file) to make sure they are defined where you think they are.

 

Also check you removed the bitmaps, etc. from the former UGII_USER_DIR - to make sure you are finding them in the NEW area, rather than the old (or somewhere else).

Ken Akerboom Sr CAx Systems Engr, Moog, Inc.
Production: NX10.0.3.5 MP16/TC11.2
I'd rather be e-steamed than e-diseaseled


Re: Startup and Application Folder

Siemens Pioneer Siemens Pioneer
Siemens Pioneer

After some exchange on one of the mailing list, I got what was wrong.

 

Roughly, all buttons actions must be defined separately in a men file.

In the rtb file, for the buttons, you should only have BUTTON and LABEL commands.

You an always define groups and gallery etc.. there.

And in a separate men file, you put there all the data for the buttons: 

MENU TEST
    BUTTON MYBUTTON

    LABEL My Button

    MESSAGE This is a button,

    BITMAP MyButton-Image.bmp

    ACTIONS doSomething.dll

    

    ...

END_OF_MENU

Re: Startup and Application Folder

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

I don't think that is exactly true.

The following was derived empirically, so someone from Siemens should really let us know the rules (or point to the docs where the rules are)

 

1) Anything pointing to an external program (.exe, .bat) needs to be defined in a .MEN, and then that button can be referenced in a .rtb or .tbr or whatever

2) Anything pointing to journal (.vb or ...) or internal API (.dll) or GRIP executable (.GRX) or (for the real old-timers) a user tool dialog (.utd) can be directly set up in a .rtb or .tbr (no need to define in a .MEN)

 

Not that the case (2) files can't be set up in a .men first - you can do this for consistency if you want

 

 

Ken Akerboom Sr CAx Systems Engr, Moog, Inc.
Production: NX10.0.3.5 MP16/TC11.2
I'd rather be e-steamed than e-diseaseled


Re: Startup and Application Folder

Siemens Pioneer Siemens Pioneer
Siemens Pioneer

Well, my problem was that all the ACTIONS (in my case NXOpen dll) were set in the rtb file and not in .men file.

 

Re: Startup and Application Folder

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

I prefer .MEN files for defining my custom functions due to explicit loading with an application.

In addition .MEN call it ACTIONS and the rest use ACTION, if I remember correctly.

Stefan Pendl, Systemmanager CAx, HAIDLMAIR GmbH
Production: NX10.0.3, VERICUT 8.2, FBM, MRL 3.1.7 | TcUA 10.1 MP7 Patch 0 (10.1.7.0) | TcVis 11.4
Development: C (ITK), .NET, Tcl/Tk Testing: NX12.0 | AWC 3.4 Preparing: NX12.0

Employees of the customers, together we are strong Smiley Wink
How to Get the Most from Your Signature in the Community
NX Customization - Best Practice Guide