NX Open C++ Reference Guide
Public Member Functions | List of all members
NXOpen::Options::OptionsManager Class Reference

Manages options. More...

Public Member Functions

std::vector< NXStringGetAllOptions ()
 Gets the names of all available options. More...
 
int GetIntValue (const NXString &name)
 Gets the value of an Options::OptionTypeInt option. More...
 
int GetIntValue (const char *name)
 Gets the value of an Options::OptionTypeInt option. More...
 
int GetIntValue (const NXString &name, NXOpen::Options::LevelType level)
 Gets the value of an Options::OptionTypeInt option at the specified level. More...
 
int GetIntValue (const char *name, NXOpen::Options::LevelType level)
 Gets the value of an Options::OptionTypeInt option at the specified level. More...
 
bool GetLogicalValue (const NXString &name)
 Gets the value of a Options::OptionTypeLogical option. More...
 
bool GetLogicalValue (const char *name)
 Gets the value of a Options::OptionTypeLogical option. More...
 
bool GetLogicalValue (const NXString &name, NXOpen::Options::LevelType level)
 Gets the value of a Options::OptionTypeLogical option at the specified level. More...
 
bool GetLogicalValue (const char *name, NXOpen::Options::LevelType level)
 Gets the value of a Options::OptionTypeLogical option at the specified level. More...
 
NXOpen::Options::OptionType GetOptionType (const NXString &name)
 Returns an option's type. More...
 
NXOpen::Options::OptionType GetOptionType (const char *name)
 Returns an option's type. More...
 
double GetRealValue (const NXString &name)
 Gets the value of a Options::OptionTypeReal option. More...
 
double GetRealValue (const char *name)
 Gets the value of a Options::OptionTypeReal option. More...
 
double GetRealValue (const NXString &name, NXOpen::Options::LevelType level)
 Gets the value of a Options::OptionTypeReal option at the specified level. More...
 
double GetRealValue (const char *name, NXOpen::Options::LevelType level)
 Gets the value of a Options::OptionTypeReal option at the specified level. More...
 
std::vector< NXStringGetReorderSelectableStringListValue (const NXString &name, std::vector< bool > &selection)
 Gets the value of a Options::OptionTypeReorderSelList option. More...
 
std::vector< NXStringGetReorderSelectableStringListValue (const char *name, std::vector< bool > &selection)
 Gets the value of a Options::OptionTypeReorderSelList option. More...
 
std::vector< NXStringGetReorderSelectableStringListValue (const NXString &name, NXOpen::Options::LevelType level, std::vector< bool > &selection)
 Gets the value of a Options::OptionTypeReorderSelList option at the specified level. More...
 
std::vector< NXStringGetReorderSelectableStringListValue (const char *name, NXOpen::Options::LevelType level, std::vector< bool > &selection)
 Gets the value of a Options::OptionTypeReorderSelList option at the specified level. More...
 
NXOpen::Options::OptionsScope GetScope (const NXString &name)
 Returns scope of an option. More...
 
NXOpen::Options::OptionsScope GetScope (const char *name)
 Returns scope of an option. More...
 
std::vector< NXStringGetStringListValue (const NXString &name)
 Gets the value of a Options::OptionTypeStringList option. More...
 
std::vector< NXStringGetStringListValue (const char *name)
 Gets the value of a Options::OptionTypeStringList option. More...
 
std::vector< NXStringGetStringListValue (const NXString &name, NXOpen::Options::LevelType level)
 Gets the value of a Options::OptionTypeStringList option at the specified level. More...
 
std::vector< NXStringGetStringListValue (const char *name, NXOpen::Options::LevelType level)
 Gets the value of a Options::OptionTypeStringList option at the specified level. More...
 
NXString GetStringValue (const NXString &name)
 Gets the value of a Options::OptionTypeString option. More...
 
NXString GetStringValue (const char *name)
 Gets the value of a Options::OptionTypeString option. More...
 
NXString GetStringValue (const NXString &name, NXOpen::Options::LevelType level)
 Gets the value of a Options::OptionTypeString option at the specified level. More...
 
NXString GetStringValue (const char *name, NXOpen::Options::LevelType level)
 Gets the value of a Options::OptionTypeString option at the specified level. More...
 
NXString GetUserComment (const NXString &name, NXOpen::Options::LevelType level)
 Returns then user comment at the specified level. More...
 
NXString GetUserComment (const char *name, NXOpen::Options::LevelType level)
 Returns then user comment at the specified level. More...
 
NXString GetUtf8stringValue (const NXString &name)
 Gets the value of a Options::OptionTypeUtf8string option. More...
 
NXString GetUtf8stringValue (const char *name)
 Gets the value of a Options::OptionTypeUtf8string option. More...
 
NXString GetUtf8stringValue (const NXString &name, NXOpen::Options::LevelType level)
 Gets the value of a Options::OptionTypeUtf8string option at the specified level. More...
 
NXString GetUtf8stringValue (const char *name, NXOpen::Options::LevelType level)
 Gets the value of a Options::OptionTypeUtf8string option at the specified level. More...
 
bool IsLevelLockedByDefault (NXOpen::Options::LevelType level)
 Returns true if the option's values at the specified level are locked by default. More...
 
bool IsValueLocked (const NXString &name, NXOpen::Options::LevelType level)
 Returns true if the option value is locked at the specified level. More...
 
bool IsValueLocked (const char *name, NXOpen::Options::LevelType level)
 Returns true if the option value is locked at the specified level. More...
 
bool IsValueSet (const NXString &name, NXOpen::Options::LevelType level)
 Returns true if the option value exists at the specified level. More...
 
bool IsValueSet (const char *name, NXOpen::Options::LevelType level)
 Returns true if the option value exists at the specified level. More...
 
NXOpen::Options::ChangeListNewOptionsChangeList (NXOpen::Options::LevelType level, NXOpen::Options::LevelLockedByDefault lockedByDefault)
 Creates an instance of NXOpen::Options::ChangeList class, in order to edit a set of options. More...
 
NXOpen::Options::DraftingStandardChangeListNewOptionsDraftingStandardChangeList (NXOpen::Options::LevelType level, const NXString &filename)
 Creates an instance of NXOpen::Options::DraftingStandardChangeList class, in order to edit a set of options. More...
 
NXOpen::Options::DraftingStandardChangeListNewOptionsDraftingStandardChangeList (NXOpen::Options::LevelType level, const char *filename)
 Creates an instance of NXOpen::Options::DraftingStandardChangeList class, in order to edit a set of options. More...
 
tag_t Tag () const
 Returns the tag of this object. More...
 

Detailed Description

Manages options.


OptionsManager methods use an option name as a unique identifier for accessing individual options and throw an error if an option with a given name is not found. All existing option names are listed in the Online Documentation.

If a level parameter is not supplied to a query method then the option value effective in current session is returned. If a level parameter is supplied then then value that is stored at the specified level is returned. This may not be the same as the value effective in the current session and may take effect only after the session is restarted.

To obtain an instance of this class, refer to NXOpen::Session

Created in NX4.0.0.

Member Function Documentation

std::vector<NXString> NXOpen::Options::OptionsManager::GetAllOptions ( )

Gets the names of all available options.

Returns
List of names of all available options.
Created in NX4.0.0.

License requirements : None
int NXOpen::Options::OptionsManager::GetIntValue ( const NXString name)

Gets the value of an Options::OptionTypeInt option.

Throws an error if option type is not Options::OptionTypeInt .

Returns
Option value
Created in NX4.0.0.

License requirements : None
Parameters
nameOption name.
int NXOpen::Options::OptionsManager::GetIntValue ( const char *  name)

Gets the value of an Options::OptionTypeInt option.

Throws an error if option type is not Options::OptionTypeInt .

Returns
Option value
Created in NX4.0.0.

License requirements : None
Parameters
nameOption name.
int NXOpen::Options::OptionsManager::GetIntValue ( const NXString name,
NXOpen::Options::LevelType  level 
)

Gets the value of an Options::OptionTypeInt option at the specified level.

Throws an error if the option is not of type Options::OptionTypeInt .

Returns
Option value
Created in NX4.0.0.

License requirements : None
Parameters
nameOption name.
levelOptions level.
int NXOpen::Options::OptionsManager::GetIntValue ( const char *  name,
NXOpen::Options::LevelType  level 
)

Gets the value of an Options::OptionTypeInt option at the specified level.

Throws an error if the option is not of type Options::OptionTypeInt .

Returns
Option value
Created in NX4.0.0.

License requirements : None
Parameters
nameOption name.
levelOptions level.
bool NXOpen::Options::OptionsManager::GetLogicalValue ( const NXString name)

Gets the value of a Options::OptionTypeLogical option.

Throws an error if the option is not of type Options::OptionTypeLogical .

Returns
Option value.
Created in NX4.0.0.

License requirements : None
Parameters
nameOption name.
bool NXOpen::Options::OptionsManager::GetLogicalValue ( const char *  name)

Gets the value of a Options::OptionTypeLogical option.

Throws an error if the option is not of type Options::OptionTypeLogical .

Returns
Option value.
Created in NX4.0.0.

License requirements : None
Parameters
nameOption name.
bool NXOpen::Options::OptionsManager::GetLogicalValue ( const NXString name,
NXOpen::Options::LevelType  level 
)

Gets the value of a Options::OptionTypeLogical option at the specified level.

Throws an error if the option is not of type Options::OptionTypeLogical .

Returns
Option value
Created in NX4.0.0.

License requirements : None
Parameters
nameOption name.
levelOptions level.
bool NXOpen::Options::OptionsManager::GetLogicalValue ( const char *  name,
NXOpen::Options::LevelType  level 
)

Gets the value of a Options::OptionTypeLogical option at the specified level.

Throws an error if the option is not of type Options::OptionTypeLogical .

Returns
Option value
Created in NX4.0.0.

License requirements : None
Parameters
nameOption name.
levelOptions level.
NXOpen::Options::OptionType NXOpen::Options::OptionsManager::GetOptionType ( const NXString name)

Returns an option's type.

Returns
Option type
Created in NX4.0.0.

License requirements : None
Parameters
nameOption name
NXOpen::Options::OptionType NXOpen::Options::OptionsManager::GetOptionType ( const char *  name)

Returns an option's type.

Returns
Option type
Created in NX4.0.0.

License requirements : None
Parameters
nameOption name
double NXOpen::Options::OptionsManager::GetRealValue ( const NXString name)

Gets the value of a Options::OptionTypeReal option.

Throws an error if the option is not of type Options::OptionTypeReal .

Returns
Option value.
Created in NX4.0.0.

License requirements : None
Parameters
nameOption name.
double NXOpen::Options::OptionsManager::GetRealValue ( const char *  name)

Gets the value of a Options::OptionTypeReal option.

Throws an error if the option is not of type Options::OptionTypeReal .

Returns
Option value.
Created in NX4.0.0.

License requirements : None
Parameters
nameOption name.
double NXOpen::Options::OptionsManager::GetRealValue ( const NXString name,
NXOpen::Options::LevelType  level 
)

Gets the value of a Options::OptionTypeReal option at the specified level.

Throws an error if the option is not of type Options::OptionTypeReal .

Returns
Option value
Created in NX4.0.0.

License requirements : None
Parameters
nameOption name.
levelOptions level.
double NXOpen::Options::OptionsManager::GetRealValue ( const char *  name,
NXOpen::Options::LevelType  level 
)

Gets the value of a Options::OptionTypeReal option at the specified level.

Throws an error if the option is not of type Options::OptionTypeReal .

Returns
Option value
Created in NX4.0.0.

License requirements : None
Parameters
nameOption name.
levelOptions level.
std::vector<NXString> NXOpen::Options::OptionsManager::GetReorderSelectableStringListValue ( const NXString name,
std::vector< bool > &  selection 
)

Gets the value of a Options::OptionTypeReorderSelList option.

Throws an error if the option is not of type Options::OptionTypeReorderSelList .

Returns
Option value
Created in NX7.5.0.

License requirements : None
Parameters
nameOption name.
selectionthe selection bit
std::vector<NXString> NXOpen::Options::OptionsManager::GetReorderSelectableStringListValue ( const char *  name,
std::vector< bool > &  selection 
)

Gets the value of a Options::OptionTypeReorderSelList option.

Throws an error if the option is not of type Options::OptionTypeReorderSelList .

Returns
Option value
Created in NX7.5.0.

License requirements : None
Parameters
nameOption name.
selectionthe selection bit
std::vector<NXString> NXOpen::Options::OptionsManager::GetReorderSelectableStringListValue ( const NXString name,
NXOpen::Options::LevelType  level,
std::vector< bool > &  selection 
)

Gets the value of a Options::OptionTypeReorderSelList option at the specified level.

Throws an error if the option is not of type Options::OptionTypeReorderSelList .

Returns
Option value
Created in NX7.5.0.

License requirements : None
Parameters
nameOption name.
levelOptions level.
selectionthe selection bit
std::vector<NXString> NXOpen::Options::OptionsManager::GetReorderSelectableStringListValue ( const char *  name,
NXOpen::Options::LevelType  level,
std::vector< bool > &  selection 
)

Gets the value of a Options::OptionTypeReorderSelList option at the specified level.

Throws an error if the option is not of type Options::OptionTypeReorderSelList .

Returns
Option value
Created in NX7.5.0.

License requirements : None
Parameters
nameOption name.
levelOptions level.
selectionthe selection bit
NXOpen::Options::OptionsScope NXOpen::Options::OptionsManager::GetScope ( const NXString name)

Returns scope of an option.

Returns
Option scope
Created in NX12.0.0.

License requirements : None
Parameters
nameOption name
NXOpen::Options::OptionsScope NXOpen::Options::OptionsManager::GetScope ( const char *  name)

Returns scope of an option.

Returns
Option scope
Created in NX12.0.0.

License requirements : None
Parameters
nameOption name
std::vector<NXString> NXOpen::Options::OptionsManager::GetStringListValue ( const NXString name)

Gets the value of a Options::OptionTypeStringList option.

Throws an error if the option is not of type Options::OptionTypeStringList .

Returns
Option value.
Created in NX4.0.0.

License requirements : None
Parameters
nameOption name.
std::vector<NXString> NXOpen::Options::OptionsManager::GetStringListValue ( const char *  name)

Gets the value of a Options::OptionTypeStringList option.

Throws an error if the option is not of type Options::OptionTypeStringList .

Returns
Option value.
Created in NX4.0.0.

License requirements : None
Parameters
nameOption name.
std::vector<NXString> NXOpen::Options::OptionsManager::GetStringListValue ( const NXString name,
NXOpen::Options::LevelType  level 
)

Gets the value of a Options::OptionTypeStringList option at the specified level.

Throws an error if the option is not of type Options::OptionTypeStringList .

Returns
Option value
Created in NX4.0.0.

License requirements : None
Parameters
nameOption name.
levelOptions level.
std::vector<NXString> NXOpen::Options::OptionsManager::GetStringListValue ( const char *  name,
NXOpen::Options::LevelType  level 
)

Gets the value of a Options::OptionTypeStringList option at the specified level.

Throws an error if the option is not of type Options::OptionTypeStringList .

Returns
Option value
Created in NX4.0.0.

License requirements : None
Parameters
nameOption name.
levelOptions level.
NXString NXOpen::Options::OptionsManager::GetStringValue ( const NXString name)

Gets the value of a Options::OptionTypeString option.

Throws an error if the option is not of type Options::OptionTypeString .

Returns
Option value.
Created in NX4.0.0.

License requirements : None
Parameters
nameOption name.
NXString NXOpen::Options::OptionsManager::GetStringValue ( const char *  name)

Gets the value of a Options::OptionTypeString option.

Throws an error if the option is not of type Options::OptionTypeString .

Returns
Option value.
Created in NX4.0.0.

License requirements : None
Parameters
nameOption name.
NXString NXOpen::Options::OptionsManager::GetStringValue ( const NXString name,
NXOpen::Options::LevelType  level 
)

Gets the value of a Options::OptionTypeString option at the specified level.

Throws an error if the option is not of type Options::OptionTypeString .

Returns
Option value
Created in NX4.0.0.

License requirements : None
Parameters
nameOption name.
levelOptions level.
NXString NXOpen::Options::OptionsManager::GetStringValue ( const char *  name,
NXOpen::Options::LevelType  level 
)

Gets the value of a Options::OptionTypeString option at the specified level.

Throws an error if the option is not of type Options::OptionTypeString .

Returns
Option value
Created in NX4.0.0.

License requirements : None
Parameters
nameOption name.
levelOptions level.
NXString NXOpen::Options::OptionsManager::GetUserComment ( const NXString name,
NXOpen::Options::LevelType  level 
)

Returns then user comment at the specified level.

User comments are not supported at the Options::LevelTypeShipped level.

Returns
User comment text.
Created in NX4.0.0.

License requirements : None
Parameters
nameOption name
levelOptions level.
NXString NXOpen::Options::OptionsManager::GetUserComment ( const char *  name,
NXOpen::Options::LevelType  level 
)

Returns then user comment at the specified level.

User comments are not supported at the Options::LevelTypeShipped level.

Returns
User comment text.
Created in NX4.0.0.

License requirements : None
Parameters
nameOption name
levelOptions level.
NXString NXOpen::Options::OptionsManager::GetUtf8stringValue ( const NXString name)

Gets the value of a Options::OptionTypeUtf8string option.

Throws an error if the option is not of type Options::OptionTypeUtf8string .

Returns
Option utf8 value.
Created in NX6.0.0.

License requirements : None
Parameters
nameOption name.
NXString NXOpen::Options::OptionsManager::GetUtf8stringValue ( const char *  name)

Gets the value of a Options::OptionTypeUtf8string option.

Throws an error if the option is not of type Options::OptionTypeUtf8string .

Returns
Option utf8 value.
Created in NX6.0.0.

License requirements : None
Parameters
nameOption name.
NXString NXOpen::Options::OptionsManager::GetUtf8stringValue ( const NXString name,
NXOpen::Options::LevelType  level 
)

Gets the value of a Options::OptionTypeUtf8string option at the specified level.

Throws an error if the option is not of type Options::OptionTypeString .

Returns
Option value
Created in NX6.0.0.

License requirements : None
Parameters
nameOption name.
levelOptions level.
NXString NXOpen::Options::OptionsManager::GetUtf8stringValue ( const char *  name,
NXOpen::Options::LevelType  level 
)

Gets the value of a Options::OptionTypeUtf8string option at the specified level.

Throws an error if the option is not of type Options::OptionTypeString .

Returns
Option value
Created in NX6.0.0.

License requirements : None
Parameters
nameOption name.
levelOptions level.
bool NXOpen::Options::OptionsManager::IsLevelLockedByDefault ( NXOpen::Options::LevelType  level)

Returns true if the option's values at the specified level are locked by default.

Locked by default means that if an option value does not exist at this level, then it is locked.

Returns
True if options values are locked by default
Created in NX4.0.0.

License requirements : None
Parameters
levelOptions level.
bool NXOpen::Options::OptionsManager::IsValueLocked ( const NXString name,
NXOpen::Options::LevelType  level 
)

Returns true if the option value is locked at the specified level.

Locks are not supported at Options::LevelTypeUser and Options::LevelTypeShipped levels.

Returns
Lock status
Created in NX4.0.0.

License requirements : None
Parameters
nameOption name
levelOptions level.
bool NXOpen::Options::OptionsManager::IsValueLocked ( const char *  name,
NXOpen::Options::LevelType  level 
)

Returns true if the option value is locked at the specified level.

Locks are not supported at Options::LevelTypeUser and Options::LevelTypeShipped levels.

Returns
Lock status
Created in NX4.0.0.

License requirements : None
Parameters
nameOption name
levelOptions level.
bool NXOpen::Options::OptionsManager::IsValueSet ( const NXString name,
NXOpen::Options::LevelType  level 
)

Returns true if the option value exists at the specified level.

Always true for the Options::LevelTypeShipped level.

Returns
True if value is set
Created in NX4.0.0.

License requirements : None
Parameters
nameOption name
levelOptions level.
bool NXOpen::Options::OptionsManager::IsValueSet ( const char *  name,
NXOpen::Options::LevelType  level 
)

Returns true if the option value exists at the specified level.

Always true for the Options::LevelTypeShipped level.

Returns
True if value is set
Created in NX4.0.0.

License requirements : None
Parameters
nameOption name
levelOptions level.
NXOpen::Options::ChangeList* NXOpen::Options::OptionsManager::NewOptionsChangeList ( NXOpen::Options::LevelType  level,
NXOpen::Options::LevelLockedByDefault  lockedByDefault 
)

Creates an instance of NXOpen::Options::ChangeList class, in order to edit a set of options.

It is not possible to create an instance of NXOpen::Options::ChangeList for Options::LevelTypeShipped level, or for a level that is not defined or is not writeable.

Returns
An instanse of NXOpen::Options::ChangeList class
Created in NX4.0.0.

License requirements : None
Parameters
levelOptions level.
lockedByDefaultSpecifies whether Options level is locked by default. Ignored at Options::LevelTypeUser level as locks at Options::LevelTypeUser level are not supported. If specified default lock status is different from the current one, then all exisitng locks are cleared.
NXOpen::Options::DraftingStandardChangeList* NXOpen::Options::OptionsManager::NewOptionsDraftingStandardChangeList ( NXOpen::Options::LevelType  level,
const NXString filename 
)

Creates an instance of NXOpen::Options::DraftingStandardChangeList class, in order to edit a set of options.

It is not possible to create an instance of NXOpen::Options::DraftingStandardChangeList for Options::LevelTypeShipped level, or for a level that is not defined or is not writeable.

Returns
An instanse of NXOpen::Options::DraftingStandardChangeList class
Created in NX5.0.0.

License requirements : None
Parameters
levelOptions level.
filenameSpecifies the filename to save/save as.
NXOpen::Options::DraftingStandardChangeList* NXOpen::Options::OptionsManager::NewOptionsDraftingStandardChangeList ( NXOpen::Options::LevelType  level,
const char *  filename 
)

Creates an instance of NXOpen::Options::DraftingStandardChangeList class, in order to edit a set of options.

It is not possible to create an instance of NXOpen::Options::DraftingStandardChangeList for Options::LevelTypeShipped level, or for a level that is not defined or is not writeable.

Returns
An instanse of NXOpen::Options::DraftingStandardChangeList class
Created in NX5.0.0.

License requirements : None
Parameters
levelOptions level.
filenameSpecifies the filename to save/save as.
tag_t NXOpen::Options::OptionsManager::Tag ( ) const

Returns the tag of this object.


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