You are here: Core Reference > Coding > Scripting > ServerObject.Class

ServerObject.Class

The ServerObject.Class property returns the name of the parent class for the database item that is referenced in the script by the ServerObject. The Class is the table in the database that contains the category of item (for more information, see Understanding the Database in the ClearSCADA Guide to the Database).

Syntax

ServerObject.Class

Description

References the class of the database item that is referenced in the script by the ServerObject.

Arguments

None.

Returns

Class {string}

The class of the database item that is referenced in the script by the ServerObject. The Class is a table in the database schema (see Working with the Database Schema in the ClearSCADA Guide to the Database).

Example:

The following script is used to display a message box showing the class of an internal analog point named 'Tank Level' (that is stored in a Group named 'Tanks'):

  • Set objTankLevel = Server.FindObject("Tanks.Tank Level")
  • MsgBox "Tank Level Class = " &objTankLevel.Class

Where:

  • objTankLevel is the name of the variable that stores the ServerObject that is returned by the FindObject function.
  • Server.FindObject("Tanks.Tank Level") instructs the script to search for the item named 'Tank Level' in the 'Tanks' Group.
  • MsgBox "Tank Level Class = " &objTankLevel.Class instructs the script to display a message box containing the message 'Tank Level Class = x' where x is the Class value of the item referenced by the objTankLevel variable (in this case, the objTankLevel variable stores the ServerObject that is returned by the FindObject function). So x is the Class value of the 'Tank Level' database item.

ClearSCADA 2015 R2