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

Provides methods for manipulating the units in a part
To obtain an instance of this class, refer to NXOpen::BasePart

Created in NX4.0.0. More...

Inheritance diagram for NXOpen::UnitCollection:
NXOpen::TaggedObjectCollection

Classes

class  iterator
 Iterator for accessing the contents of the collection. More...
 

Public Member Functions

iterator begin ()
 Returns an iterator addressing the first element. More...
 
double Convert (NXOpen::Unit *initialUnit, NXOpen::Unit *targetUnit, double initialValue)
 Convert a value from one unit of measure to another. More...
 
iterator end ()
 Returns an iterator addressing one past the last element. More...
 
NXOpen::UnitFindObject (const NXString &journalIdentifier)
 Finds the Unit with the given identifier as recorded in a journal. More...
 
NXOpen::UnitFindObject (const char *journalIdentifier)
 Finds the Unit with the given identifier as recorded in a journal. More...
 
NXOpen::UnitGetBase (const NXString &measureName)
 Find the base part unit for a given type of measure. More...
 
NXOpen::UnitGetBase (const char *measureName)
 Find the base part unit for a given type of measure. More...
 
std::vector< NXStringGetMeasures ()
 Finds the list of different types of measures available in the system. More...
 
std::vector< NXOpen::Unit * > GetMeasureTypes (const NXString &measureName)
 Finds the units that are available for a given type of measure. More...
 
std::vector< NXOpen::Unit * > GetMeasureTypes (const char *measureName)
 Finds the units that are available for a given type of measure. More...
 
tag_t Tag () const
 Returns the tag of this object. More...
 

Detailed Description

Provides methods for manipulating the units in a part
To obtain an instance of this class, refer to NXOpen::BasePart

Created in NX4.0.0.


Member Function Documentation

iterator NXOpen::UnitCollection::begin ( )

Returns an iterator addressing the first element.

double NXOpen::UnitCollection::Convert ( NXOpen::Unit initialUnit,
NXOpen::Unit targetUnit,
double  initialValue 
)

Convert a value from one unit of measure to another.

Returns

Created in NX4.0.0.

License requirements : None
Parameters
initialUnitinitial measurement unit
targetUnittarget measurement unit
initialValueinitial value
iterator NXOpen::UnitCollection::end ( )

Returns an iterator addressing one past the last element.

NXOpen::Unit* NXOpen::UnitCollection::FindObject ( const NXString journalIdentifier)

Finds the Unit with the given identifier as recorded in a journal.

An exception will be thrown if no object can be found with the given journal identifier.

Returns
Unit found
Created in NX4.0.0.

License requirements : None
Parameters
journalIdentifierIdentifier to be found
NXOpen::Unit* NXOpen::UnitCollection::FindObject ( const char *  journalIdentifier)

Finds the Unit with the given identifier as recorded in a journal.

An exception will be thrown if no object can be found with the given journal identifier.

Returns
Unit found
Created in NX4.0.0.

License requirements : None
Parameters
journalIdentifierIdentifier to be found
NXOpen::Unit* NXOpen::UnitCollection::GetBase ( const NXString measureName)

Find the base part unit for a given type of measure.

Returns
base unit
Created in NX4.0.0.

License requirements : None
Parameters
measureNamethe type of measure
NOTE: The full Unicode character set is not supported for this parameter.
NXOpen::Unit* NXOpen::UnitCollection::GetBase ( const char *  measureName)

Find the base part unit for a given type of measure.

Returns
base unit
Created in NX4.0.0.

License requirements : None
Parameters
measureNamethe type of measure
NOTE: The full Unicode character set is not supported for this parameter.
std::vector<NXString> NXOpen::UnitCollection::GetMeasures ( )

Finds the list of different types of measures available in the system.


Types of measures include length, area and volume

Returns
Array of names of measure types
Created in NX4.0.0.

License requirements : None
std::vector<NXOpen::Unit *> NXOpen::UnitCollection::GetMeasureTypes ( const NXString measureName)

Finds the units that are available for a given type of measure.

Returns
Array of units for a given measurement type
Created in NX4.0.0.

License requirements : None
Parameters
measureNamethe type of measure
NOTE: The full Unicode character set is not supported for this parameter.
std::vector<NXOpen::Unit *> NXOpen::UnitCollection::GetMeasureTypes ( const char *  measureName)

Finds the units that are available for a given type of measure.

Returns
Array of units for a given measurement type
Created in NX4.0.0.

License requirements : None
Parameters
measureNamethe type of measure
NOTE: The full Unicode character set is not supported for this parameter.
tag_t NXOpen::UnitCollection::Tag ( ) const

Returns the tag of this object.


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