UOMDatabase Class
- Last UpdatedNov 18, 2025
- 7 minute read
- PI System
- AF SDK 2024 R2
- Developer
The UOMDatabase is the top-level object in the
OSIsoft.AF.UnitsOfMeasure namespace which provides a set of
classes for describing a value's unit of measure and for converting
from one unit to another unit.

Inheritance Hierarchy
Namespace: OSIsoft.AF.UnitsOfMeasure
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
[SerializableAttribute] public sealed class UOMDatabase : AFObject, IAFTransactable, IAFChangedEvent, IAFSecurable, IComparable<UOMDatabase>
<SerializableAttribute> Public NotInheritable Class UOMDatabase Inherits AFObject Implements IAFTransactable, IAFChangedEvent, IAFSecurable, IComparable(Of UOMDatabase) Dim instance As UOMDatabase
[SerializableAttribute] public ref class UOMDatabase sealed : public AFObject, IAFTransactable, IAFChangedEvent, IAFSecurable, IComparable<UOMDatabase^>
[<SealedAttribute>] [<SerializableAttribute>] type UOMDatabase = class inherit AFObject interface IAFTransactable interface IAFChangedEvent interface IAFSecurable interface IComparable<UOMDatabase> end
The UOMDatabase type exposes the following members.
Properties
| Name | Description | |
|---|---|---|
| CheckOutInfo |
This read-only property returns the checked out status information for the object.
| |
| DisplayUOMGroup |
Setting specifies the desired UOMGroup to be used when displaying attribute values for the user.
| |
| ID |
Read-only property that provides a unique identifier for the object to be used for
quick access that is not dependent upon the index.
(Inherited from AFObject.) | |
| Identity |
This read-only property contains identity of the object.
(Inherited from AFObject.) | |
| IsDeleted |
This read-only property indicates whether the object has been deleted.
(Inherited from AFObject.) | |
| IsDirty |
This read-only property indicates whether the object has been modified since the
last save to the PI AF Server.
| |
| IsNew |
This read-only property indicates whether the object is new and has never been saved
to the PI AF Server.
| |
| PISystem |
This read-only property allows access to the PISystem associated with this
object.
(Inherited from AFObject.) | |
| Security |
This read-only property returns the AFSecurity information for the object.
| |
| UniqueID |
Read-only property that provides the object's ID as a String.
(Inherited from AFObject.) | |
| UOMClasses | ||
| UOMGroups | ||
| UOMs |
Methods
| Name | Description | |
|---|---|---|
| ApplyChanges |
This method applies the changes to the object and makes
those changes available to other objects for the current user.
| |
| CheckIn |
This method checks in (commits) all the changes to the object by saving
the information to persistent storage.
| |
| CheckOut |
This method locks the object so that its configuration can be modified.
| |
| CompareTo(Object) |
Compares this instance with a specified Object.
(Inherited from AFObject.) | |
| CompareTo(AFObject) |
Compares this instance with a specified AFObject.
(Inherited from AFObject.) | |
| Equals(Object) |
Determines whether the specified Object is equal to the current object.
(Inherited from AFObject.) | |
| Equals(AFObject) |
Indicates whether the current object is equal to another object of the same type.
(Inherited from AFObject.) | |
| GetDisplayUOMGroup(ClaimsIdentity) |
Gets the DisplayUOMGroup setting for a specified user identity.
| |
| GetDisplayUOMGroup(WindowsIdentity) |
Gets the DisplayUOMGroup setting for a specified user identity.
| |
| GetHashCode |
Gets the hash code for this instance of the object which is suitable for use in hashing
algorithms and data structures like a hash table.
(Inherited from AFObject.) | |
| GetPath |
Returns the full path to the object, using just the names.
(Inherited from AFObject.) | |
| GetPath(AFObject) |
Returns the path to the object relative from another object.
(Inherited from AFObject.) | |
| GetPath(AFEncodeType, AFObject) |
Returns the path to the object relative from another object,
using the name and/or id as specified
by encodeType.
(Inherited from AFObject.) | |
| GetSecurity |
Gets the AFSecurity information of the specified security item
associated with the object.
| |
| GetType | Gets the Type of the current instance. (Inherited from Object.) | |
| GetWarnings |
Gets warnings associated with the UOMs defined. Warnings indicate a possible configuration issue.
| |
| Persist |
This method returns the persistence string for the object.
(Inherited from AFObject.) | |
| Refresh |
Refreshes the client with any changes that have been made to the object since loaded.
| |
| ToString |
Returns a String that represents the current object.
(Overrides AFObjectToString.) | |
| UndoCheckOut |
This method discards all the changes to the object and all sub-objects since the
last call to CheckOut. Any changes since the check out will be lost.
|
Events
| Name | Description | |
|---|---|---|
| Changed |
Event is raised when the object or one of its sub-objects is changed.
|
Remarks
The PI Units Of Measure consists of four objects (UOMDatabase,
UOMGroup, UOMClass, and UOM)
and three collections
(UOMGroups, UOMClasses and UOMs).
There is one UOMDatabase associated with a PISystem.
Examples
PISystems myPISystems = new PISystems(); UOMDatabase myDB = myPISystems.DefaultPISystem.UOMDatabase; // Display the number of UOMs Console.WriteLine("UOM count = {0}", myDB.UOMs.Count); // Display UOMDatabase information Console.WriteLine("PISystem of UOMDatabase = {0}", myDB.PISystem.Name); Console.WriteLine("UniqueID of UOMDatabase = {0}", myDB.UniqueID); Console.WriteLine("Number of UOMClasses = {0}", myDB.UOMClasses.Count); Console.WriteLine("Number of UOMs = {0}", myDB.UOMs.Count);
Dim myPISystems As New PISystems Dim myDB As UOMDatabase = myPISystems.DefaultPISystem.UOMDatabase ' Display the number of UOMs Console.WriteLine("UOM count = {0}", myDB.UOMs.Count) ' Display UOMDatabase information Console.WriteLine("PISystem of UOMDatabase = {0}", myDB.PISystem.Name) Console.WriteLine("UniqueID of UOMDatabase = {0}", myDB.UniqueID) Console.WriteLine("Number of UOMClasses = {0}", myDB.UOMClasses.Count) Console.WriteLine("Number of UOMs = {0}", myDB.UOMs.Count)
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.