cancel
Showing results for 
Search instead for 
Did you mean: 

NX11custom native vs managed

Phenom
Phenom

Looks like I managed to delete my original post, during editing.

 

Hoping @Gerrit can shed some light...

 

In order to lock down editing of the files, and group/site level settings I seperated the user customer defaults files, from the ootb NX110custom folder, and edited the Tc_NX110TCIN.bat and NX110common.bat files.

 

Tc_NX110TCIN.bat:

:: Customer Defaults Folder Location
set NX_CUSTOMER_DEFAULTS_DIR=%NX_CUSTOM_LIB%\CustomerDefaults\Tc

:: Create and verify USERNAME folder (You may change the User Defaults folder on the line below)
::set NX_USER_DEFAULTS_DIR=%NX_CUSTOMER_DEFAULTS_DIR%\Users
:: ***  This line Seperates user defaults from site and group defaults.
set NX_USER_DEFAULTS_DIR=\\NCENTFILSRV02\NX_Files\NX\CustomerDefaults\%NX_NUMBER%\Tc\Users

NX110common.bat:

:: Customer Defaults Folder Location in Native
::set NX_CUSTOMER_DEFAULTS_DIR=%NX_CUSTOM_LIB%\CustomerDefaults\Tc
set NX_CUSTOMER_DEFAULTS_DIR=%NX_CUSTOM_LIB%\CustomerDefaults

:: Customer Defaults Folder Location for Users in Native
:: Create and verify USERNAME folder (You may change the User Defaults folder on the line below)
::set NX_USER_DEFAULTS_DIR=%NX_CUSTOMER_DEFAULTS_DIR%\Users
set NX_USER_DEFAULTS_DIR=\\NCENTFILSRV02\NX_Files\NX\CustomerDefaults\%NX_NUMBER%\Users

The problem is, the user settings get stored in the native location, not the TC location, which I found odd.  I thought setting the variable in Tc_NX110TCIN.bat first, would prevent NX110common.bat from setting it?

 

I can force it, by changing the line in NX11-common.bat to:

set NX_USER_DEFAULTS_DIR=\\NCENTFILSRV02\NX_Files\NX\CustomerDefaults\%NX_NUMBER%\Tc\Users

But for some reason, this prevents native NX from exporting DXF/DWG files.  IR 8804972

 

Thoughts?  we don't use native very often, so I think we can survive not exporting DXF in native, but I'm more curious as to why the env variables aren't working they way I expected?

 

My folder structure:

FolderStructure.jpg

 

-Dave
NX 11 | Teamcenter 11 | Windows 8.1
8 REPLIES

Re: NX11custom native vs managed

Siemens Legend Siemens Legend
Siemens Legend

Hello Dave,

 

When i look into your edits, the user folder should be created as :
   

\\NCENTFILSRV02\NX_Files\NX\CustomerDefaults\NX110\Tc\Users\%USERNAME%

Can you check the following :

  • Does after starting NX the folder with the username appear in:
    \\NCENTFILSRV02\NX_Files\NX\CustomerDefaults\NX110\Tc\User
    ?
  • Can you add in the bottom of the "Tc_NX110TCIN.bat" before starting NX the following:
    echo NX_CUSTOMER_DEFAULTS_DIR = %NX_CUSTOMER_DEFAULTS_DIR%
    pause
    and see what the output is on the screen shows you.

In principle if you would call the "NX110common.bat" file somewhere in the "Tc_NX110TCIN.bat" (especially after you changed the vaiables as you described, the "NX110common.bat" file will win.

For a variable set in a script, the last one is always winning. Opposite to what happens in the .dat files. There the first one wins.

 

I hope this makes it a bit clear.

If it still is not working please send your entire content of the "Tc_NX110TCIN.bat" file.

 

Regards,

Regards,

Gerrit Koelewijn

Re: NX11custom native vs managed

Phenom
Phenom

Gerrit wrote:

 

In principle if you would call the "NX110common.bat" file somewhere in the "Tc_NX110TCIN.bat" (especially after you changed the vaiables as you described, the "NX110common.bat" file will win.

 


OK, well everything is working as you described, and the quoted line above answers my primary question.  I didn't realize the last called, wins.

 

Now the unknown, is why does the dxf/dwg translator not work, if I include the Tc level in the folder structure...   I'll have to experiment, and just alter the path so it is happy, and I get everyone's personal settings in the correct place.

 

Edit:  so if the last call wins, is there any reason to keep NX_CUSTOMER_DEFAULTS_DIR and NX_USER_DEFAULTS_DIR in both places?  Could we just leave them in the NX110common.bat?

-Dave
NX 11 | Teamcenter 11 | Windows 8.1

Re: NX11custom native vs managed

Siemens Legend Siemens Legend
Siemens Legend

Hello Dave,

 

It is possible to only set the NX_CUSTOMER_DEFAULTS_DIR and NX_USER_DEFAULTS_DIR in the "NX110common.bat" file, but then there is no difference between the customer defaults for Native vs. Managed. Some customers use different Customer defaults for both environments.

The choice is yours.

 

Regards,

 

Regards,

Gerrit Koelewijn

Re: NX11custom native vs managed

Esteemed Contributor
Esteemed Contributor

IIRC - I saw somewhere (weekly SFB blast?) that a temp file gets created in the "Start in" folder during DXF export (or import?).  If you don't have write access to the "start in" folder, it can't export.

 

In your .BAT file, try something like

 

CD /D %TMP%

 (the "/D" allows it to change drives, as well as folders)

 

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


Re: NX11custom native vs managed

Esteemed Contributor
Esteemed Contributor

Windows command scripts support the "IF DEFINED {variable name}" condition, so you can prevent changing the variable at a later stage too.

For further information open a Windows command prompt and enter "if /?" to get the detailed usage.

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: NX11custom native vs managed

Phenom
Phenom

So if I explicitly wanted different locations for native and managed defaults, I would have to remove both from common.bat, and set them in the NX110.bat adn TcNX110TCIN.bat?

 

Also, regarding the DXF issue:

More experimenting, and it's not the path that is causing the DXF failure.  If a new user fires up NX everything works fine, regardless of which customer default paths I set.  Only users that had files carried over from NX9, ie user.mtx, etc.

 

I know I was warned about carrying them over, but my gut said the complaint line would ring off the hook if users "lost" things.

 

Now, any user with the DXF problem, will get the files removed, and have to create new.  Lesson learned by me.

-Dave
NX 11 | Teamcenter 11 | Windows 8.1

Re: NX11custom native vs managed

Esteemed Contributor
Esteemed Contributor

You can copy over the files from one release to another even if you might not get all the new features visible.

What I would never copy over to a new release is the dialog memory, which has given me trouble when settings changed or similar.

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: NX11custom native vs managed

Phenom
Phenom

I have a user wiht the problem, and we are going to remove files one at a time, rather than the full "flush" I did on me, during testing.  dialog will be the first to go, thanks.

-Dave
NX 11 | Teamcenter 11 | Windows 8.1