vcScalarQuantity
vcScalarQuantity is the basic implementation for quantities used in the application and provides access to units.
Usage
Each quantity represents a unit of measurement and magnitude (size). A quantity can be classified as either a scalar or vector value depending on its spatial nature. That is, a direction or force is required to fully describe vector quantity. For example, time and mass are scalar quantities while acceleration and weight are vector quantities.
When a vcProperty object references a quantity the property must define a unit group, which is a group of units that apply to the quantity and belong to the same unit family. The actual unit of the quantity is then defined by the quantity's magnitude, which is a value, expressed in canonical units, that specifies the size of the unit.
In terms of hierarchy, a quantity may belong to a subset of quantities that have the same parent quantity. For example, Volume is a built-in parent quality that has a Liquid child quantity. Liquid measures liquid volumes, whereas Volume can describe any spatial volume.
In terms of categorization, a quantity may belong to a category which is an informative string/label describing the type or context of quantity.
Properties
Name | Type | Access | Description |
AvailableGroups | List of vcUnitGroup | R | Gets a list of all unit groups that include the quantity, thereby any one of those groups can be used to access and select quantity. |
Category | String | RW/R | If built-in quantity, gets category of quantity; otherwise defines the category of a quantity. |
Children | List of vcScalarQuantity | R | Gets a list of all child quantities for the quantity.
If no child quantities, value is empty list. |
CurrentGroup | vcUnitGroup | RW | Defines the current unit group used for listing the quantity's properties.
To set, give either a vcUnitGroup object or name of unit group. If value is None and quantity has a parent quality, uses the current group of parent. |
EffectiveGroup | vcUnitGroup | R | Gets the actual unit group used for listing the quantity's properties.
If CurrentGroup is None, uses unit group of parent quantity. |
FullName | String | R | Gets the full name of quantity, which is the concatenation of parent quantity names with a dot (.) separator and Name.
You can refer to a quantity by referencing its full name. |
IsBuiltIn | Boolean | R | Indicates if quantity is a built-in quantity which cannot be edited nor destroyed. |
Name | String | RW/R | If quantity is built-in, gets name of quantity; otherwise defines the quantity's name. |
Parent | vcScalarQuantity | RW/R | If quantity is built-in, gets parent quantity; otherwise defines the parent of quantity.
To set, give either a vcScalarQuantity object or full name of quantity. |
Type | String | R | Gets the quantity type.
See Quantity Constants for more information. |
Methods
Name | Return Type | Parameters | Description |
createChildQuantity | vcScalarQuantity | String name, Enumeration type | Adds a new child quantity of a given name and type to the quantity.
See Quantity Constants for more information. |
destroy | None | None | If quantity is not built-in, destroys the quantity; otherwise throws an exception. |
getEffectiveUnit | vcUnit | Real magnitude | Returns a unit from effective unit group of quantity that closely matches a given magnitude. |