daluigi
Industrial
- Apr 17, 2010
- 216
Is it possible to remove an NX menu command for all users ?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
VERSION 121
EDIT UG_GATEWAY_MAIN_MENUBAR
MODIFY
BUTTON UG_FILE_SAVE_ALL
BITMAP Delete
ACTIONS "start iexplore [URL unfurl="true"]http://your_site.com/this_function_disabled_page.html[/URL] "
END_OF_MODIFY
HIDE UG_FILE_SAVE_ALL
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
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
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