Server.LookUpObject

The LookUpObject function is a server function that allows a script to locate an item in the database. The LookUpObject function works in a similar way to the Server.FindObject function, except that it uses an Object Id (the unique identification reference of a database item) instead of an Object Name. The LookUpObject function returns a ServerObject that has its own functions and properties (see see ServerObject Functions and see ServerObject Properties).

Syntax

Server.LookUpObject (ObjectId)

Description

Locates an item in the database and allows a script to manipulate the item.

The LookUpObject function returns a ServerObject. A ServerObject is
a Geo SCADA Expert specific script object that has its own functions and properties which can be manipulated.

Arguments

Object Id {integer}

The unique Id number of the item that you want to locate in the database.

Returns

ServerObject

A reference to an item in the database. The returned ServerObject has its own ServerObject Functions and ServerObject Properties.

Example:

Set objAI1Point = Server.LookUpObject (601)

MsgBox "This Sensor is named:" &objAI1Point.Name

Where:

  • objAI1Point is the variable that is used to store the ServerObject that is returned by the LookUpObject function.
  • (601) is the unique Object Id of the database item that is to be searched for by the
  • LookUpObject function. In this case, it is the point with the Object Id of 601 that is located in the root of the system.
  • MsgBox "This Sensor is named:" instructs the script to display a message box containing the text "This Sensor named:"
  • &objAI1Point.Name instructs the script to add the Name value of the ServerObject (that is returned by the LookUpObject function and stored in the objAI1Point variable) to the message box. When the message box is displayed, it contains the message:

    "This Sensor is named: <Name of point that has Object ID 601>".

See also:

Server.RootObject

Server.ThisObject.


Disclaimer

Geo SCADA Expert 2022