vcUnitManager

A class used to manage vcUnit-related objects.

See in: Overview

Module: vcCore

Parent: -

Children -

Referenced by: -

Properties

Learn how to use properties here. The properties are also inherited from the parent class.

NameTypeAccessDescription
CurrentUnitFamilyvcUnitFamilyRGets currently selected unit family.
UnitFamiliesdict[tuple[String, vcUnitFamily]]RGets a list of all unit families.
UnitGroupsdict[tuple[String, vcUnitGroup]]RGets a list of all unit groups.

Methods

Learn how to use methods here. The methods are also inherited from the parent class.

NameReturn TypeParametersDescription
createQuantityvcQuantityString name,
vcQuantityKind quantityKind
Create a new quantity of a given name and type.
See more
Parameters:
name (String): The full name of the new quantity.
quantityKind (vcQuantityKind): Whether a scalar or vector quantity.

Exceptions:
ValueError: When given quantity name is empty or not unique.

Returns:
vcQuantity: Created quantity.
createUnitFamilyvcUnitFamilyString nameCreate a new unit family with a given name.
See more
Parameters:
name (String): Specifies the name of the unit family and may not contain dot characters.

Exceptions:
ValueError: When given unit family name is empty or not unique.

Returns:
vcUnitFamily: Created unit family.
createUnitGroupvcUnitGroupString nameCreate a new unit group of a given name.
See more
Parameters:
name (String): Specifies the name of the unit group and may not contain dot characters.

Exceptions:
ValueError: When given unit group name is empty or not unique.

Returns:
vcUnitGroup: Created unit group.
findQuantityvcQuantityString nameFinds a quantity matching a given name.
See more
Parameters:
name (String): Name of the searched quantity.

Returns:
vcQuantity: Found quantity, or None if no quantity with such name exists.

See Quantity strings
findUnitFamilyvcUnitFamilyString nameFinds a unit family matching a given name.
See more
Parameters:
name (String): Name of the searched unit family.

Returns:
vcUnitFamily: Found unit family, or None if no unit family with such name exists.

See UnitFamily strings
findUnitGroupvcUnitGroupString nameFinds a unit group matching a given name.
See more
Parameters:
name (String): Name of the searched unit group.

Returns:
vcUnitGroup: Found unit group, or None if no unit group with such name exists.

See UnitGroup strings