NXOpen .NET Reference  12.0.0
Public Types | Public Member Functions | Protected Member Functions | Properties | List of all members
NXOpen.UnitCollection Class Reference

Provides methods for manipulating the units in a part More...

Inheritance diagram for NXOpen.UnitCollection:

Public Types

enum  UnitDefaults {
  LbmInLbfDegF, LbmFtLbfDegF, GMmNDegC, GCmNDegC,
  KgMNRadK, KgMmNDegC
}
 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

NXOpen.Unit[] ToArray ()
 Returns an array of NXOpen.Unit objects. More...
 
unsafe void SetDefaultDataEntryUnits (NXOpen.UnitCollection.UnitDefaults defaults)
 Set a choice of default set of units for data entry in the given part. More...
 
unsafe
NXOpen.UnitCollection.UnitDefaults 
GetDefaultDataEntryUnits ()
 Get the choice of default set of units for data entry in the given part More...
 
unsafe void SetDefaultObjectInformationUnits (NXOpen.UnitCollection.UnitDefaults defaults)
 Set a choice of default set of units for object information in the given part More...
 
unsafe
NXOpen.UnitCollection.UnitDefaults 
GetDefaultObjectInformationUnits ()
 Get the choice of default set of units for object information in the given part More...
 
unsafe NXOpen.Unit FindObject (string name)
 Finds the Unit with the given name. More...
 
unsafe string[] GetMeasures ()
 Finds the list of different types of measures available in the system. More...
 
unsafe NXOpen.Unit[] GetMeasureTypes (string measureName)
 Finds the unit types that are available for a given measure More...
 
unsafe NXOpen.Unit GetBase (string measureName)
 Find the base unit type for a given measure. More...
 
unsafe double Convert (NXOpen.Unit initialUnitType, NXOpen.Unit targetUnitType, double initialValue)
 Convert a value from one unit of measure to another More...
 

Protected Member Functions

override int EnumerateMoveNext (ref Tag currentTag, byte[] state)
 Advances the enumerator to the next element of the collection. More...
 

Properties

Tag Tag [get]
 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 Enumeration Documentation

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.

Enumerator
LbmInLbfDegF 

Usual choice for inch parts.

LbmFtLbfDegF 

Not supported for data entry units

GMmNDegC 

Not supported for data entry units

GCmNDegC 

Not supported for data entry units

KgMNRadK 

SI compatibility

KgMmNDegC 

Usual choice for mm parts

Member Function Documentation

unsafe double NXOpen.UnitCollection.Convert ( NXOpen.Unit  initialUnitType,
NXOpen.Unit  targetUnitType,
double  initialValue 
)

Convert a value from one unit of measure to another

Created in NX4.0.0

License requirements: None.

Parameters
initialUnitTypeinitial measurement unit
targetUnitTypetarget measurement unit
initialValue
Returns
override int NXOpen.UnitCollection.EnumerateMoveNext ( ref Tag  currentTag,
byte[]  state 
)
protected

Advances the enumerator to the next element of the collection.

unsafe NXOpen.Unit NXOpen.UnitCollection.FindObject ( string  name)

Finds the Unit with the given name.

Created in NX4.0.0

License requirements: None.

Parameters
nameName to be found
Returns
Unit found
unsafe NXOpen.Unit NXOpen.UnitCollection.GetBase ( string  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.

Created in NX4.0.0

License requirements: None.

Parameters
measureNamethe type of measure
Returns
base unit
unsafe NXOpen.UnitCollection.UnitDefaults NXOpen.UnitCollection.GetDefaultDataEntryUnits ( )

Get the choice of default set of units for data entry in the given part

Created in NX12.0.0

License requirements: None.

Returns
unsafe NXOpen.UnitCollection.UnitDefaults NXOpen.UnitCollection.GetDefaultObjectInformationUnits ( )

Get the choice of default set of units for object information in the given part

Created in NX12.0.0

License requirements: None.

Returns
unsafe string [] NXOpen.UnitCollection.GetMeasures ( )

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

Types of measures include length, area and volume

Created in NX4.0.0

License requirements: None.

Returns
Array of names of measures
unsafe NXOpen.Unit [] NXOpen.UnitCollection.GetMeasureTypes ( string  measureName)

Finds the unit types that are available for a given measure

Created in NX4.0.0

License requirements: None.

Parameters
measureNamethe type of measure
Returns
Array of units for a given measurement type
unsafe 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.

Parameters
defaults
unsafe 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.

Parameters
defaults
NXOpen.Unit [] NXOpen.UnitCollection.ToArray ( )

Returns an array of NXOpen.Unit objects.

Property Documentation

Tag NXOpen.UnitCollection.Tag
get

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.