Get an object ID - Metasys - LIT-12013522 - Software Application - Basic Services client library for .NET (and COM) - Metasys API - 4.2

Metasys REST Client for .NET and COM Developer Guide

Brand
Metasys
Product name
Basic Services client library for .NET (and COM)
Metasys API
Document type
API Reference Guide
Document number
LIT-12013522
Version
4.2
Revision date
2021-04-07
Language
English (United States)

Use the GetObjectIdentifier method to retrieve an object ID given its fully qualified reference. The Metasys user interfaces often refer to an object ID as the item reference.

Table 1. Get an object ID .NET signature
Library method name GetObjectIdentifier
Description Retrieve an object ID.
Method signature Guid GetObjectIdentifier(string ItemReference)
Method input parameters ItemReference: fully qualified reference (FQR) of the object, from which the method returns the GUID.
Return value The Guid object.
The following .NET C# code is an example of successful object ID response:
Guid objectId = client.GetObjectIdentifier("Win2016-VM2:vNAE2343996/Field Bus MSTP1.VAV-08.ZN-SP");
Console.WriteLine(objectId);
/*        
d5d96cd3-db4a-52e0-affd-8bc3393c30ec
*/