Showing results for 
Search instead for 
Do you mean 
Reply
Solved! Go to solution

Different custom settings in ug_main.men for NX Managed vs NX Native

I would like to customize ug_main.men so that "Save As" is hidden in Managed mode but not in Native mode. Can this be done within ug_main.men or do I need to create two different files and point the environment to the one that matches the mode NX is run in?

 

 

10 REPLIES
Solution
Solution
Accepted by topic author jonparkinson
‎01-19-2017 04:26 PM

Re: Different custom settings in ug_main.men for NX Managed vs NX Native

Why would you want to hide save as, don't you need revisions in manged mode?

Generally I would create a MEN file of my own that hides the action and include it only in managed mode.

This can be done by a variable that is only set in managed NX and the custom_dirs.dat file utilizing it to point to a folder structure that contains that MEN file.

In the batch file that you use to start managed NX you could add this before starting NX:

set UGII_CUSTOM_DIRECTORY_FILE=C:\Siemens\NX_Custom\hide_save_as.dat

The file hide_save_as.dat would contain:

#
#include $UGII_BASE_DIR\UGII\menus\custom_dirs.dat
#
C:\Siemens\NX_Custom\hide_save_as

The folder "C:\Siemens\NX_Custom\hide_save_as" contains the folder "startup".

The folder startup contains the file hide_save_as.men, which contains:

!
!  NX menu file to hide save as action
!
VERSION 121

EDIT UG_GATEWAY_MAIN_MENUBAR

HIDE UG_FILE_SAVE_AS

MODIFY

    BUTTON UG_FILE_SAVE_AS
    SENSITIVITY OFF

END_OF_MODIFY

Still it would be better to not disable it, since it might not even work as intended.

 

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: Different custom settings in ug_main.men for NX Managed vs NX Native

Thanks for the response. That helps. One more question along similar lines: In Native mode, NX does not display Save As Non-master. How does NX know to display something different for Native vs Managed modes? I don't see anything in ug_main.men to distinguish between a tool that's unique to one mode or the other.

In answer to your question, I need users to use the Save As Non-master for creating a New Item. You are correct--I'll need to keep the regular Save As around for creating new Revisions. I think I'll end up leaving both there but tweaking the names to alert them to which to use for which action. The reason for all this is that when I try to do Save As->New Item, NX throws an error. Evidently this is because NX 10 doesn't support Dynamic LOVs. For whatever reason, it works fine if I do Save As->Non-master.

Re: Different custom settings in ug_main.men for NX Managed vs NX Native

[ Edited ]

The latest fix for "Save As" in a managed NX session was incorporated into NX 10.0.3 MP11, so you may want to upgrade to this release to avoid the need to have two different ways of save as work-flows.

"Save As" is broken in NX 10.0.3 in managed mode, but with NX 10.0.3 MP11 everything that we have found troubling us is fixed.

The availability of menu entries is managed by NX internally, the MEN files only contain the menu structure.

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: Different custom settings in ug_main.men for NX Managed vs NX Native


Stefan_Pendl wrote:

The latest fix for "Save As" in a managed NX session was incorporated into NX 10.0.3 MP11, so you may want to upgrade to this release to avoid the need to have two different ways of save as work-flows.

"Save As" is broken in NX 10.0.3 in managed mode, but with NX 10.0.3 MP11 everything that we have found troubling us is fixed.

The availability of menu entries is managed by NX internally, the MEN files only contain the menu structure.


Thanks, but I'm already on MP11.

Re: Different custom settings in ug_main.men for NX Managed vs NX Native

I think you are using Tc 10.1 too, so you are missing some BMIDE settings in your database.

The solution to allow us to use "Save As => New Item" without crashing NX was to add the following deep copy rules as of PR#7707483:

Sorry for the delay, you have not been forgotten about.
The solution we had in mind, where a change to your DeepCopyRules, should have resolved this issue.

The fact that it didn't either means your issue is different or the rules were not applied as per the following:
1> ItemRevision::IMAN_UG_wave_position::MatchAll::copyAsReference::required=true
2> ItemRevision::IMAN_UG_wave_geometry::MatchAll::copyAsReference::required=true
3> ItemRevision::TC_DrawingOf::MatchAll::copyAsReference::required=true

Essentially you need to create a DeepCopyRule for all objects potentially referenced when performing a Save-As/Revise.
The above examples will need to be applied to the appropriate action: Save-As and/or Revise.

So these may need to be added twice - hopefully that makes sense.
Please can you let me know if these rules exist in your BMIDE project.
If not, please add them, if yes, please send me your project.

The response for a final solution was:

There are several IR's/PR's on this topic. For Tc10.x the solution is to use the provided workaround, this workaround can't be included in a Tc10.x patch as a change is required on both client and server side.

This fix has been included in Tc11.2.x onwards.

With the above mentioned additions you should be able to use "Save As => New Item".

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: Different custom settings in ug_main.men for NX Managed vs NX Native

Yes, we're on TC 10.1. I'll take a look at it. Thanks!

Re: Different custom settings in ug_main.men for NX Managed vs NX Native

You *may* be able to have one set of files.

1) You need to figure out if TC is involved using ENV variables.  Depending on what you have set up, this may include any or all of

- 2 tier clients

- 4 tier clients

- Active Workspace clients

- (are there any others - starting NX in managed mode w/o TC client?)

2) Determine for the above what ENV variables exist
I start using a 4 tier client, then start NX from the TC client, so in the NX log file I see

FMS_HOME and FCC_HOME as possibilities.

3) ASSUMING appropriate ENV variables can be found, set up you ugii_env.dat file, so

- UGII_SITE_DIR is set to folder with stuff common to both environments (see the "NXCustom" threads for one example)

- set UGII_GROUP_DIR to one of 2 different folders (one for native, one for TC) using the "#if" constructs available for the ugii_env.dat file.  See here for documentation:

https://docs.plm.automation.siemens.com/tdoc/nx/11/release_notes/#uid:id1356752

 

Then in the 2 different "group" dirs specify stuff that is "TC only" or "native only"

 

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: Different custom settings in ug_main.men for NX Managed vs NX Native

Who would really replace the OOTB menu files shipping with NX?

In addition I have tried to disable "save as" due to the same issue as described above, where "save as => new item" resulted in the NX session to get hung. I was not able to succeed, since the availability of the open and save actions is handled with internal code, so there is no way to manage them through a simple men file.

The problem that causes the "save as => new item" action to crash must be fixed, anything else is just cosmetic and only a temporary work-around.

We have suffered from the "save as => new item" issue and got it fixed as described above, so there is already a solution available and the menu can just be kept as is.

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: Different custom settings in ug_main.men for NX Managed vs NX Native


Stefan_Pendl wrote:

The problem that causes the "save as => new item" action to crash must be fixed, anything else is just cosmetic and only a temporary work-around.

We have suffered from the "save as => new item" issue and got it fixed as described above, so there is already a solution available and the menu can just be kept as is.


 

The PR you quoted earlier isn't viewable in the Solutions Center. Was that issue caused by Dynamic LOVs?