« Back to Product

Documentation

IPS_GetVariableProfile

 array IPS_GetVariableProfile (string $ProfileName) 

Parameters

ProfileName

Name of the profile

Returns

The following information is available as key => value pairs:

Index Type Description
Associations array Array with value, name, icon, color pairs (see Associations Table)
Icon string Icon of the variable profile
IsReadOnly boolean TRUE if the profile is a system created profile, which can not be changed
MaxValue float The maximum value used for the visualization
MinValue float The minimum value used for the visualization
StepSize float Step size for the visualization, 0 when the association table is used
Digits integer Number of decimal places
Prefix string Prefix for the visualization
Suffix string Suffix for the visualization
ProfileName string Name of the profile. (~ = System profile)
ProfileType integer Type of profile (see ProfileType table)

Associations Table

Index Type Description
Value float Value that is associated with the given name, icon, and color
Name string Name of the specified value
Icon string Icon of the specified value
Color integer Color value in HTML format, e.g., 0x0000FF for blue. Special case: -1 (COLOR_TRANSPARENT) for transparent

ProfileType
The profile type and the variable type (IPS_CreateVariable) must be identical so that a display in the WebFront can be shown correctly.

Value Constant Description
0 VARIABLETYPE_BOOLEAN A profile of the type Boolean
1 VARIABLETYPE_INTEGER A profile of the type Integer
2 VARIABLETYPE_FLOAT A profile of the type Float
3 VARIABLETYPE_STRING A profile of the type String

Description

This function returns an array that contains information about the variable profile with the name ProfileName.

Example

print_r( IPS_GetVariableProfile("~WindDirection") ); 
 
/* returns e.g.:
Array
(
    [Associations] => Array
    (
    )
    
    [Digits] => 1
    [Icon] => WindDirection
    [IsReadOnly] => 1
    [MaxValue] => 360
    [MinValue] => 0
    [Prefix] =>
    [ProfileName] => ~WindDirection
    [ProfileType] => 2
    [StepSize] => 60
    [Suffix] => °
)
*/
Any questions?