NX Open C++ Reference Guide
Classes | Public Member Functions
NXOpen::UnitCollection Class Reference

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

Created in NX4.0.0. More...

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

List of all members.

Classes

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

Public Member Functions

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

Detailed Description

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

Created in NX4.0.0.



Member Function Documentation

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

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

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.

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.
tag_t NXOpen::UnitCollection::Tag ( ) const

Returns the tag of this object.


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