NX Open C++ Reference Guide
|
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...
Classes | |
class | iterator |
Iterator for accessing the contents of the collection. More... | |
Public Types | |
enum | UnitDefaults { UnitDefaultsLbmInLbfDegF, UnitDefaultsLbmFtLbfDegF, UnitDefaultsGMmNDegC, UnitDefaultsGCmNDegC, UnitDefaultsKgMNRadK, UnitDefaultsKgMmNDegC } |
Specifies a set of units to be used as defaults for data entry or object information For each measure, a unit type will be selected that matches the specified choice. More... | |
Public Member Functions | |
iterator | begin () |
Returns an iterator addressing the first element. More... | |
double | Convert (NXOpen::Unit *initialUnitType, NXOpen::Unit *targetUnitType, 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::Unit * | FindObject (const NXString &name) |
Finds the Unit with the given name. More... | |
NXOpen::Unit * | FindObject (const char *name) |
Finds the Unit with the given name. More... | |
NXOpen::Unit * | GetBase (const NXString &measureName) |
Find the base unit type for a given measure. More... | |
NXOpen::Unit * | GetBase (const char *measureName) |
Find the base unit type for a given measure. More... | |
NXOpen::UnitCollection::UnitDefaults | GetDefaultDataEntryUnits () |
Get the choice of default set of units for data entry in the given part. More... | |
NXOpen::UnitCollection::UnitDefaults | GetDefaultObjectInformationUnits () |
Get the choice of default set of units for object information in the given part. More... | |
std::vector< NXString > | GetMeasures () |
Finds the list of different types of measures available in the system. More... | |
std::vector< NXOpen::Unit * > | GetMeasureTypes (const NXString &measureName) |
Finds the unit types that are available for a given measure. More... | |
std::vector< NXOpen::Unit * > | GetMeasureTypes (const char *measureName) |
Finds the unit types that are available for a given measure. More... | |
void | SetDefaultDataEntryUnits (NXOpen::UnitCollection::UnitDefaults defaults) |
Set a choice of default set of units for data entry in the given part. More... | |
void | SetDefaultObjectInformationUnits (NXOpen::UnitCollection::UnitDefaults defaults) |
Set a choice of default set of units for object information in the given part Created in NX12.0.0. More... | |
tag_t | Tag () const |
Returns the tag of this object. More... | |
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.
Specifies a set of units to be used as defaults for data entry or object information For each measure, a unit type will be selected that matches the specified choice.
The choice affects these dimensions: Lenth Mass Force Angle Temperature Delta Temperature
These dimensions are not affected: Electric Charge (A-sec) Luminous Intensity (cd) Amount of Substance (mol)
NOTE: Only the SI unit set is an internally consistent set of units. For example, the unit for Force (N) is used in all the metric sets, but since it's defined as kg*m/s^2, it's compatible only with kg and m, which are used in the SI set. Similarly, the unit deg is used for all the sets except the SI set.
iterator NXOpen::UnitCollection::begin | ( | ) |
Returns an iterator addressing the first element.
double NXOpen::UnitCollection::Convert | ( | NXOpen::Unit * | initialUnitType, |
NXOpen::Unit * | targetUnitType, | ||
double | initialValue | ||
) |
Convert a value from one unit of measure to another.
initialUnitType | initial measurement unit |
targetUnitType | target measurement unit |
initialValue | initial value |
iterator NXOpen::UnitCollection::end | ( | ) |
Returns an iterator addressing one past the last element.
NXOpen::Unit* NXOpen::UnitCollection::FindObject | ( | const NXString & | name | ) |
Finds the Unit with the given name.
name | Name to be found |
NXOpen::Unit* NXOpen::UnitCollection::FindObject | ( | const char * | name | ) |
Finds the Unit with the given name.
name | Name to be found |
NXOpen::Unit* NXOpen::UnitCollection::GetBase | ( | const NXString & | measureName | ) |
Find the base unit type for a given measure.
The returned unit type depends on whether the part is an inch or millimeter part.
measureName | the type of measure |
NXOpen::Unit* NXOpen::UnitCollection::GetBase | ( | const char * | measureName | ) |
Find the base unit type for a given measure.
The returned unit type depends on whether the part is an inch or millimeter part.
measureName | the type of measure |
NXOpen::UnitCollection::UnitDefaults NXOpen::UnitCollection::GetDefaultDataEntryUnits | ( | ) |
Get the choice of default set of units for data entry in the given part.
NXOpen::UnitCollection::UnitDefaults NXOpen::UnitCollection::GetDefaultObjectInformationUnits | ( | ) |
Get the choice of default set of units for object information in the given part.
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
std::vector<NXOpen::Unit *> NXOpen::UnitCollection::GetMeasureTypes | ( | const NXString & | measureName | ) |
Finds the unit types that are available for a given measure.
measureName | the type of measure |
std::vector<NXOpen::Unit *> NXOpen::UnitCollection::GetMeasureTypes | ( | const char * | measureName | ) |
Finds the unit types that are available for a given measure.
measureName | the type of measure |
void NXOpen::UnitCollection::SetDefaultDataEntryUnits | ( | NXOpen::UnitCollection::UnitDefaults | defaults | ) |
Set a choice of default set of units for data entry in the given part.
Created in NX12.0.0.
License requirements : None
defaults | defaults |
void NXOpen::UnitCollection::SetDefaultObjectInformationUnits | ( | NXOpen::UnitCollection::UnitDefaults | defaults | ) |
Set a choice of default set of units for object information in the given part
Created in NX12.0.0.
License requirements : None
defaults | defaults |
tag_t NXOpen::UnitCollection::Tag | ( | ) | const |
Returns the tag of this object.