Represents a quantity.
More...
|
| HRESULT | AsAngle ([in] enum AngleUnit unit, [out, retval] double *pValue) |
| | Returns the quantity value as an angle measure.
|
| |
| HRESULT | AsArea ([in] enum AreaUnit unit, [out, retval] double *pValue) |
| | Returns the quantity value as an area measure.
|
| |
| HRESULT | AsCount ([out, retval] int *pValue) |
| | Returns the quantity value as a number.
|
| |
| HRESULT | AsElevation ([in] enum LengthUnit unit, [out, retval] double *pValue) |
| | Returns the quantity value as an elevation measure. The value of the elevation measure can be either positive or negative.
|
| |
| HRESULT | AsLength ([in] enum LengthUnit unit, [out, retval] double *pValue) |
| | Returns the quantity value as a length measure. The value of the length measure is always positive.
|
| |
| HRESULT | AsMass ([in] enum MassUnit unit, [out, retval] double *pValue) |
| | Returns the quantity value as a mass measure.
|
| |
| HRESULT | AsVolume ([in] enum VolumeUnit unit, [out, retval] double *pValue) |
| | Returns the quantity value as a volume measure.
|
| |
| HRESULT | HasValue ([out, retval] VARIANT_BOOL *pResult) |
| | Indicates if the quantity has a value.
|
| |
|
| BSTR | Name [get] |
| | The name of the quantity. Eequals to the quantity's GUID name.
|
| |
| BSTR | Text [get] |
| | The localized text that describes the meaning of the quantity.
|
| |
|
QuantityType | Type [get] |
| | The type of the quantity.
|
| |
Represents a quantity.
Quantity contains the value of one of the following types: number, length, area, volume or mass. This interface can be obtained through IQuantityContainer.
◆ AsAngle()
| HRESULT AsAngle |
( |
[in] enum AngleUnit | unit, |
|
|
[out, retval] double * | pValue ) |
Returns the quantity value as an angle measure.
- Parameters
-
| [in] | unit | The angle measurement unit. |
| [out] | pValue | The quantity's value in specified units. |
◆ AsArea()
| HRESULT AsArea |
( |
[in] enum AreaUnit | unit, |
|
|
[out, retval] double * | pValue ) |
Returns the quantity value as an area measure.
- Parameters
-
| [in] | unit | The area measurement unit. |
| [out] | pValue | The quantity's value in specified units. |
◆ AsCount()
| HRESULT AsCount |
( |
[out, retval] int * | pValue | ) |
|
Returns the quantity value as a number.
- Parameters
-
| [out] | pValue | The quantity's value. |
◆ AsElevation()
| HRESULT AsElevation |
( |
[in] enum LengthUnit | unit, |
|
|
[out, retval] double * | pValue ) |
Returns the quantity value as an elevation measure. The value of the elevation measure can be either positive or negative.
For a quantity of type QuantityType_Elevation, you can also get the value as a length measure using the AsLength method.
- Parameters
-
| [in] | unit | The length measurement unit. |
| [out] | pValue | The quantity's value in specified units. |
- See also
- AsLength
◆ AsLength()
| HRESULT AsLength |
( |
[in] enum LengthUnit | unit, |
|
|
[out, retval] double * | pValue ) |
Returns the quantity value as a length measure. The value of the length measure is always positive.
- Parameters
-
| [in] | unit | The length measurement unit. |
| [out] | pValue | The quantity's value in specified units. |
◆ AsMass()
| HRESULT AsMass |
( |
[in] enum MassUnit | unit, |
|
|
[out, retval] double * | pValue ) |
Returns the quantity value as a mass measure.
- Parameters
-
| [in] | unit | The mass measurement unit. |
| [out] | pValue | The quantity's value in specified units. |
◆ AsVolume()
| HRESULT AsVolume |
( |
[in] enum VolumeUnit | unit, |
|
|
[out, retval] double * | pValue ) |
Returns the quantity value as a volume measure.
- Parameters
-
| [in] | unit | The volume measurement unit. |
| [out] | pValue | The quantity's value in specified units. |
◆ HasValue()
| HRESULT HasValue |
( |
[out, retval] VARIANT_BOOL * | pResult | ) |
|
Indicates if the quantity has a value.
- Returns
- TRUE if the quantity has a value; otherwise returns FALSE.
◆ Name
The name of the quantity. Eequals to the quantity's GUID name.
Use IQuantity::Text to get description.
- Returns
- The name of the quantity.
◆ Text
The localized text that describes the meaning of the quantity.
- Returns
- The text of the quantity.