×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

NX85 - remove a menu command?

NX85 - remove a menu command?

NX85 - remove a menu command?

(OP)
Is it possible to remove an NX menu command for all users ?

RE: NX85 - remove a menu command?

Are you talking about removing an icon on a tool bar or menu item on a pull-down from the menu bar? If so, yes. However, if you're talking about an option or an item on a function's dialog, probably not.

Exactly what is it that you're looking to remove?

John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
Siemens PLM:
UG/NX Museum:

To an Engineer, the glass is twice as big as it needs to be.

RE: NX85 - remove a menu command?

(OP)
I'am talking about a menu item on a pull-down from the menu bar.
To make things even more "simple" that menu item should be unaccessible for all users sharing our common NX customization (based the Startup folder, Application folder, etc.).

RE: NX85 - remove a menu command?

What item(s) is it that you want to remove?

John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
Siemens PLM:
UG/NX Museum:

To an Engineer, the glass is twice as big as it needs to be.

RE: NX85 - remove a menu command?

(OP)
File > Save All

RE: NX85 - remove a menu command?

You have two choices, either make a copy of the 'ug_main.men' file (found at ...\UGII\menus) and remove the lines of text from the file which defines the 'Save All' options. Then place this edited .men file (don't change its name) in the 'Application' folder. Alternatively, you could create a Menufile which removes those same entries and place it in the 'Startup' folder. Either way, the 'Save All' commands will have been removed from the pull-down meanu.

John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
Siemens PLM:
UG/NX Museum:

To an Engineer, the glass is twice as big as it needs to be.

RE: NX85 - remove a menu command?

You have 2 choices to 'remove' the text that defines the 'save all' option: 1) turn the lines into 'comments' 2) delete the lines from the file.

I'd recommend the commenting option rather than deleting it entirely from the file; this makes it easy to revert back if needed. Marking a line as a comment usually involves adding a special character at the beginning of the line. In the .men files I think it is the "!" character; there should be other comments in the file, just follow suit.

Either route you take, make a backup copy of the original file before editing it.

www.nxjournaling.com

RE: NX85 - remove a menu command?

(OP)
I like the 2nd option of modifying via an extra menu placed in the Startup folder.
I have tried the folowing place in a ".men" file but it does not work - any idea is welcome:

EDIT UG_GATEWAY_MAIN_MENUBAR
HIDE UG_FILE_SAVE_ALL

Thank you.

RE: NX85 - remove a menu command?

The use of Hide and an "Edit " .men file is good because it doesn't require editing OOTB files or risk getting overwritten by updates.
Some concerns:
Existing mtx files may still display the menu option if it had been previously displayed.
The key accelerator will still work for the operation so "finger memory" could be a loophole.

A variant would be to use the "edit" .men file to redefine the bitmap (do not use) and redefine the action to "redirect to a web page explaining that the function is intentional removed". This would insure that loopholes did not perform the original operation.

CODE --> .men

VERSION 121
EDIT UG_GATEWAY_MAIN_MENUBAR

MODIFY 
BUTTON UG_FILE_SAVE_ALL
BITMAP Delete
ACTIONS "start iexplore http://your_site.com/this_function_disabled_page.html "
END_OF_MODIFY
HIDE UG_FILE_SAVE_ALL 

HTH, Joe

RE: NX85 - remove a menu command?

I'm curious, - Why ?

Regards,
Tomas

RE: NX85 - remove a menu command?

OK, there appears to be a bug in NX 8.5. Your file should have worked and it did, using NX 7.5, NX 8.0, NX 9.0 and even NX 10.0. I'll open a PR and let you know what I find. What's the exact version of NX 8.5 that you're running? I tested this using NX 8.5.3.3.

John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
Siemens PLM:
UG/NX Museum:

To an Engineer, the glass is twice as big as it needs to be.

RE: NX85 - remove a menu command?

(OP)
NX 8.5.2.3

RE: NX85 - remove a menu command?

Hi,
I've made this .men file :

CODE -->

VERSION 121
EDIT UG_GATEWAY_MAIN_MENUBAR

MODIFY 
BUTTON UG_FILE_SAVE_PART
LABEL &Save
TOOLBAR_LABEL Save
MESSAGE Saves the work part in ISO view.
SYNONYMS store, files, assembly
BITMAP filesave
ACCELERATOR Ctrl+S
ACTIONS "save_en_ISO.vb"
END_OF_MODIFY 
but doesn't work.
When press the save button a DOS window open and close rapidly and I can't see what texts are present inside.
The code is correct because NX starts correctly.
What I wrong ?

Thank you...

Using NX 8 and PDM RuleDesigner

RE: NX85 - remove a menu command?

I don't see anything that that would cause a DOS window to open. That would seem to indicate that it's something in your VB program. Have you tried to execute it manually to see what happens?

John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
Siemens PLM:
UG/NX Museum:

To an Engineer, the glass is twice as big as it needs to be.

RE: NX85 - remove a menu command?

Cubalibre00,

Please use "Information, Custom Menu Bar, Custom Item Report", search the listing window for "UG_FILE_SAVE_PART".
If the "Actions:" line is followed by a line with the name of your vb file the the problem is in your VB file.
If the line following "Actions:" is "<actions not registered>" then your vb file is in the wrong place. Put the VB file in the "Application" sub-directory of any of the directories in ug_custom_dirs.dat E.g. UGII_SITE_DIR\application.

HTH, Joe

RE: NX85 - remove a menu command?

Joe,
with you suggestions I've resolved the problem.
Thank you.

Thank you...

Using NX 8 and PDM RuleDesigner

RE: NX85 - remove a menu command?

Hi,
the vb works in modeling and in assembly, not in drawing.
This custom .men, can exclude drawing environment ?

Thank you...

Using NX 8 and PDM RuleDesigner

RE: NX85 - remove a menu command?

Cubalibre00,

Not that I am aware of (while using an "Edit" style .men file).

Your VB program could check for the Drafting application and exit without doing anything if the program is run while in Drafting.

CODE --> VB

Option Strict On
Imports System
Imports NXOpen
Imports NXOpen.UF

Module NXJournal
Sub Main (ByVal args() As String)

Dim theSession As Session = Session.GetSession()
Dim theUfSession As UfSession = UFSession.GetUFSession()
Dim lw As ListingWindow = theSession.ListingWindow
lw.Open()
Dim moduleId As Integer = -1
theUfSession.UF.AskApplicationModule(moduleId)
if moduleId = UFConstants.UF_APP_DRAFTING      
lw.WriteLine("We are in Drafting")
else
lw.WriteLine("Life is good")
end if
End Sub
End Module 


HTH, Joe

RE: NX85 - remove a menu command?

Hi Joe,
your support has resolved my problem.
Thank you again.

Thank you...

Using NX 8 and PDM RuleDesigner

RE: NX85 - remove a menu command?

Hi Joe,
during the normal work I've found an exception in the Journal.
The journal works fine, but doesn't save the drawing if it's new, for example when I make a master model specification.
This is the code:

CODE -->

Option Strict On
Imports System
Imports NXOpen
Imports NXOpen.UF

Module NXJournal
Sub Main (ByVal args() As String)

Dim theSession As Session = Session.GetSession()
Dim theUfSession As UfSession = UFSession.GetUFSession()
Dim moduleId As Integer = -1
theUfSession.UF.AskApplicationModule(moduleId)
if moduleId = UFConstants.UF_APP_DRAFTING
Dim workPart As Part = theSession.Parts.Work      
Dim partSaveStatus1 As PartSaveStatus
partSaveStatus1 = workPart.Save(BasePart.SaveComponents.True, BasePart.CloseAfterSave.False)
partSaveStatus1.Dispose()
else
Dim workPart As Part = theSession.Parts.Work
workPart.ModelingViews.WorkView.Orient(View.Canned.Isometric, View.ScaleAdjustment.Fit)     
Dim partSaveStatus1 As PartSaveStatus
partSaveStatus1 = workPart.Save(BasePart.SaveComponents.True, BasePart.CloseAfterSave.False)
partSaveStatus1.Dispose()
end if
End Sub
End Module 
Idea to resolve this exception, where I would like the save the new drawing.

Thank you...

Using NX 8 and PDM RuleDesigner

RE: NX85 - remove a menu command?

Hi,
I'm using the 2nd option indicated by John :

Quote (John)

Alternatively, you could create a Menufile which removes those same entries and place it in the 'Startup' folder.
and all work fine for all users, but now, some users don't like.
Can this 2nd option be available only for some users ?
We have all centralized, very similar to the jpetach customization (Siemens forum).

Thank you...

Using NX 8 and PDM RuleDesigner

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources