Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AF SDK Reference

UOMClasses.Add Method (String, String, String)

  • Last UpdatedNov 18, 2025
  • 2 minute read
UOMClasses.Add Method (String, String, String)
The Add method creates a new object and adds it to the collection.

Namespace:  OSIsoft.AF.UnitsOfMeasure
Assembly:  OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182

Syntax

public UOMClass Add(
	string name,
	string canonicalUnit,
	string canonicalAbbreviation
)
Public Function Add ( 
	name As String,
	canonicalUnit As String,
	canonicalAbbreviation As String
) As UOMClass

Dim instance As UOMClasses
Dim name As String
Dim canonicalUnit As String
Dim canonicalAbbreviation As String
Dim returnValue As UOMClass

returnValue = instance.Add(name, canonicalUnit, 
	canonicalAbbreviation)
public:
UOMClass^ Add(
	String^ name, 
	String^ canonicalUnit, 
	String^ canonicalAbbreviation
)
member Add : 
        name : string * 
        canonicalUnit : string * 
        canonicalAbbreviation : string -> UOMClass 

Parameters

name
Type: SystemString
The name for the new object. The name must be unique within the collection. If the name ends with an asterisk (*), then a unique name will be generated based on the supplied name. See the ValidateName(String, String) method for a description of what is valid when setting the name of the object.
canonicalUnit
Type: SystemString
The name for canonical unit of measure for this class. This UOM will be created by this method. If the name ends with an asterisk (*), then a unique name will be generated based on the supplied name.
canonicalAbbreviation
Type: SystemString
The abbreviated name for the canonical unit of measure for this class. The abbreviation must be unique within the UOMs collection or the same as the canonicalUnit parameter. If not specified (empty or ), the abbreviation defaults to the same as the canonicalUnit.

Return Value

Type: UOMClass
Returns the newly created object that was added.

Remarks

Use the UOMBaseClasses.Add method to add base UOM dimensions for a derived UOM class and their powers.

Version Information

AFSDK


See Also

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in