« Back to Product

Documentation

RegisterVariableBoolean

Require: IP-Symcon >= 4.0

 int RegisterVariableBoolean (string $Ident, string $Name, string $Profile, int $Position) 

Parameters

Ident

Ident of the status variable

Name

Name of the status variable

Profile

Name of the profile to be used.
Default == ""

Position

Position in the object tree and thus also in the visualization.
Default == 0

Returns

VariableID of the created status variable

Description

This function creates a status variable of the type Boolean with the Ident Ident and the name Name. It can also be specified which Profile is to be used and which Position the status variable should be on.

Warning

This function can also be called if the variable already exists. In this case only the profile is updated, given it is diverging. If the variable type is different, the variable will be deleted without confirmation and recreated with the correct variable type.

Warning

The VariableID can be determined via GetIDForIdent, therefore it does not have to be saved anywhere.

Example

$variableID = $this->RegisterVariableBoolean("Switch", "Living room light switch");
Any questions?