NX Open C++ Reference Guide
Public Types | Public Member Functions | Static Public Member Functions | List of all members
NXOpen::UI Class Reference

This class contains the various elements that represent the NX User Interface. More...

Inheritance diagram for NXOpen::UI:
NXOpen::TaggedObject

Public Types

enum  Status { StatusLock, StatusUnlock }
 Indicates the Lock, Unlock status of NX functions. More...
 
typedef NXOpen::Callback1
< void, bool > 
UtilityFunctionVisibilityHandler
 User defined method is called whenever an NX utility function state changes. More...
 

Public Member Functions

int AddUtilityFunctionVisibilityHandler (const NXOpen::UI::UtilityFunctionVisibilityHandler &utilityFunctionVisibilityHandler)
 Registers a user defined method that is called whenever an utility function state changes. More...
 
NXOpen::UI::Status AskLockStatus ()
 Query NX lock status. More...
 
bool CanOpenPart ()
 Returns a flag indicating whether the NX user interface is in a state where opening a part and making it the display part is supported. More...
 
NXOpen::CustomPopupMenuHandlerCreateCustomPopupMenuHandler ()
 Create a custom menu. More...
 
NXOpen::BlockStyler::BlockDialogCreateDialog (const NXString &dialogName)
 Creates a block dialog. More...
 
NXOpen::BlockStyler::BlockDialogCreateDialog (const char *dialogName)
 Creates a block dialog. More...
 
void JournalPause ()
 Pauses execution of a journal. More...
 
void LockAccess ()
 Locks access to the NX User Interface. More...
 
NXOpen::MenuBar::MenuBarManagerMenuBarManager ()
 Returns the NXOpen::MenuBar::MenuBarManager belonging to the current session
Created in NX3.0.0. More...
 
NXOpen::MovieManagerMovieManager ()
 the Movie Manager class. More...
 
NXOpen::NXMessageBoxNXMessageBox ()
 the Uistyler for the current session. More...
 
NXOpen::Preferences::ObjectPreferencesObjectPreferences ()
 the UI based Object Preferences in the current session. More...
 
void RemoveUtilityFunctionVisibilityHandler (int id)
 Unregisters a user defined method that is called whenever an utility function state changes. More...
 
NXOpen::ResourceBarManagerResourceBarManager ()
 Returns the ResourceBarManager for the current session
Created in NX10.0.0. More...
 
NXOpen::SelectionSelectionManager ()
 the SelectionManager for the current session. More...
 
NXOpen::UIStyler::StylerStyler ()
 the Uistyler for the current session. More...
 
void UnlockAccess ()
 Unlocks access for a UI that has been locked by a call to LockAccess . More...
 
NXOpen::Preferences::SessionUserInterfaceUIUserInterfacePreferences ()
 the UI based User Interface Preferences in the current session
Created in NX3.0.0. More...
 
NXOpen::ViewUIManagerViewUIManager ()
 Returns the ViewUIManager
Created in NX11.0.1. More...
 
NXOpen::Preferences::VisualizationLineVisualizationLinePreferences ()
 the UI based Visualization Preferences under Line Tab in the current session
Created in NX3.0.0. More...
 
NXOpen::Preferences::SessionVisualizationShadeVisualizationShadingPreferences ()
 the UI based Visualization Preferences under Shading Tab in the current session
Created in NX3.0.0. More...
 
NXOpen::Preferences::SessionVisualizationVisualVisualizationVisualPreferences ()
 the UI based Visualization Preferences under Visual Tab in the current session
Created in NX3.0.0. More...
 
- Public Member Functions inherited from NXOpen::TaggedObject
tag_t Tag () const
 Returns the tag of this object. More...
 

Static Public Member Functions

static UIGetUI ()
 

Detailed Description

This class contains the various elements that represent the NX User Interface.

There is a single instance of this class per session. To obtain a reference to the current UI, call the static method UI::GetUI .

For Java, use

SessionFactory::get("UI")

to obtain the reference of the current UI.

For language bindings that support remoting, the server must export it for this class to be obtained by a client.


Use the static method in this class to obtain an instance.

Created in NX3.0.0.

Member Typedef Documentation

User defined method is called whenever an NX utility function state changes.

An example of a NX utility function is the Preferences - User Interface dialog.


The input parameter, visible is true when the function becomes visible and false when the function is no longer visible.


NX utility functions can be nested. The following scenario describes when this method is called for a function call in the middle of another function and then exiting both functions:

First utility function call
Second utility function call while the first utility function is still visible
Second utility function exit
First utility function exit


Created in NX5.0.5.

License requirements : None

Member Enumeration Documentation

Indicates the Lock, Unlock status of NX functions.

Enumerator
StatusLock 

Lock status.

StatusUnlock 

Unlock status.

Member Function Documentation

int NXOpen::UI::AddUtilityFunctionVisibilityHandler ( const NXOpen::UI::UtilityFunctionVisibilityHandler utilityFunctionVisibilityHandler)

Registers a user defined method that is called whenever an utility function state changes.

Returns
identifier of registered method (used to unregister the method)
Created in NX5.0.5.

License requirements : None
Parameters
utilityFunctionVisibilityHandlerutilityfunctionvisibilityhandler
NXOpen::UI::Status NXOpen::UI::AskLockStatus ( )

Query NX lock status.

This function is useful when dismissing a custom dialog and you want to determine whether or not a lock has been set. Returns NXOpen::UI::StatusLock , when NX is in lock status. Returns NXOpen::UI::StatusUnlock , when NX is in unlock status.

Returns

Created in NX5.0.0.

License requirements : None
bool NXOpen::UI::CanOpenPart ( )

Returns a flag indicating whether the NX user interface is in a state where opening a part and making it the display part is supported.

For example if certain dialogs are displayed or the system is in a task environment it is not supported

Returns

Created in NX8.5.0.

License requirements : None
NXOpen::CustomPopupMenuHandler* NXOpen::UI::CreateCustomPopupMenuHandler ( )

Create a custom menu.

Returns

Created in NX6.0.4.

License requirements : None
NXOpen::BlockStyler::BlockDialog* NXOpen::UI::CreateDialog ( const NXString dialogName)

Creates a block dialog.

Use

#undef CreateDialog

in C++ programs to avoid confusion with Windows API

Returns

Created in NX6.0.0.

License requirements : None
Parameters
dialogNameDialog name
NXOpen::BlockStyler::BlockDialog* NXOpen::UI::CreateDialog ( const char *  dialogName)

Creates a block dialog.

Use

#undef CreateDialog

in C++ programs to avoid confusion with Windows API

Returns

Created in NX6.0.0.

License requirements : None
Parameters
dialogNameDialog name
void NXOpen::UI::JournalPause ( )

Pauses execution of a journal.


Created in NX4.0.0.

License requirements : None

void NXOpen::UI::LockAccess ( )

Locks access to the NX User Interface.

This method may be used for a custom dialog that requires the session to remain in a known state. When this method is called, all menu items that would allow the user to edit the model are grayed out.
Note that until UnlockAccess is called, the user will not be able to interact with the session. You must ensure that the UI is unlocked when the custom dialog terminates.

This method will throw an exception if the UI cannot be locked. Note that if the UI has already been locked, then it is safe to call this method again.


Created in NX3.0.0.

License requirements : None

NXOpen::MenuBar::MenuBarManager* NXOpen::UI::MenuBarManager ( )

Returns the NXOpen::MenuBar::MenuBarManager belonging to the current session
Created in NX3.0.0.


NXOpen::MovieManager* NXOpen::UI::MovieManager ( )

the Movie Manager class.


Created in NX3.0.0.

NXOpen::NXMessageBox* NXOpen::UI::NXMessageBox ( )

the Uistyler for the current session.


Created in NX3.0.0.

NXOpen::Preferences::ObjectPreferences* NXOpen::UI::ObjectPreferences ( )

the UI based Object Preferences in the current session.


Created in NX3.0.0.

void NXOpen::UI::RemoveUtilityFunctionVisibilityHandler ( int  id)

Unregisters a user defined method that is called whenever an utility function state changes.


Created in NX5.0.5.

License requirements : None

Parameters
ididentifier for method to unregister
NXOpen::ResourceBarManager* NXOpen::UI::ResourceBarManager ( )

Returns the ResourceBarManager for the current session
Created in NX10.0.0.


NXOpen::Selection* NXOpen::UI::SelectionManager ( )

the SelectionManager for the current session.


Created in NX3.0.0.

NXOpen::UIStyler::Styler* NXOpen::UI::Styler ( )

the Uistyler for the current session.


Created in NX3.0.0.

void NXOpen::UI::UnlockAccess ( )

Unlocks access for a UI that has been locked by a call to LockAccess .

If the UI is already unlocked, this method has no effect.


Created in NX3.0.0.

License requirements : None

NXOpen::Preferences::SessionUserInterfaceUI* NXOpen::UI::UserInterfacePreferences ( )

the UI based User Interface Preferences in the current session
Created in NX3.0.0.


NXOpen::ViewUIManager* NXOpen::UI::ViewUIManager ( )

Returns the ViewUIManager
Created in NX11.0.1.


NXOpen::Preferences::VisualizationLine* NXOpen::UI::VisualizationLinePreferences ( )

the UI based Visualization Preferences under Line Tab in the current session
Created in NX3.0.0.


NXOpen::Preferences::SessionVisualizationShade* NXOpen::UI::VisualizationShadingPreferences ( )

the UI based Visualization Preferences under Shading Tab in the current session
Created in NX3.0.0.


NXOpen::Preferences::SessionVisualizationVisual* NXOpen::UI::VisualizationVisualPreferences ( )

the UI based Visualization Preferences under Visual Tab in the current session
Created in NX3.0.0.



The documentation for this class was generated from the following file:
Copyright 2017 Siemens Product Lifecycle Management Software Inc. All Rights Reserved.