Go to documentation repository
Page History
The GetObjectName method returns the name of the object that it was given upon creation.during registration in the program.
Syntax for method invocation:Method call syntax
Code Block | ||
---|---|---|
| ||
function GetObjectName(objtype : String, id : String) : String |
Method arguments:
- objtype - Required is a required argument. The It specifies the system type of the object whose which name is you want to be returned. It takes the following get. Possible values: Type – String type, range – existing is limited by object types registered in the system.
- id - Required is a required argument. Identification It corresponds to the identification (registration) number of the object of the type set in the objtype parameter. It takes the following values: Type – String, range – existing object identification numbers specified by the objtype argument. Possible values: String type, the range is limited by the identification numbers of objects of the specified type registered in the system.
Usage examples
Problem. In case of Example. On alarm in any sensor, open the information window with the following text - : "Alarm in the <alarmed sensor name> sensor . Sensor connected to the <server name the Server <name of the section to which the sensor is connected to> server”connected>”.
Info | ||
---|---|---|
| ||
Create You must create the information dialog window beforehand using the Arpedit.exe utility and save it as in the test.dlg file in the <Intellect><Intellect installation directory>\Program folder. |
Code Block | ||
---|---|---|
| ||
if (Event.SourceType == "GRAY" && Event.Action == "ALARM") { var grayid = Event.SourceId; var grayname = GetObjectName("GRAY", grayid); var compname = GetObjectParentId("GRAY", grayid, "COMPUTER"); DoReactStr("DIALOG", "test", "CLOSE_ALL",""); DoReactStr("DIALOG", "test", "RUN","Alarm in the sensor '" + grayname + "'. sensorSensor connected to the Server '" + compname + "' server."); } |
Overview
Content Tools