colorGetAlias()

A color scheme is a collection of colorDB files located in a subdirectory of proj_path/colorDB, for example, WinCC_OA_proj_path/colorDB/DayScheme/colors. Hence, the name of the schema is "DaySchema" - the name of the directory. The function colorGetAlias() returns the color name of an alias from a desired colorDB file.

Synopsis

int colorGetAlias(string fileName, string alias, string &colorName);

Parameters

Parameter Meaning fileName The color name of an alias from the desired colorDB file. The file path can be absolute or relative. If the file path is relative, the path proj_path/colorDB is used. alias The alias name. colorName The color name that is returned.

Return Value

In case of error -1. Otherwise 0.

Errors

Missing or wrong arguments.

Description

A color scheme is a collection of colorDB files located in a subdirectory of proj_path/colorDB, for example, proj_path/colorDB/DayScheme/colors. Hence, the name of the schema is "DaySchema" - the name of the directory. The user interface loads all colorDB files and additionally all colorDB files from the active color schema. Hence, you can overload colors by using a color schema. The function colorGetAlias() returns the color name of an alias from a desired file.

Note that in order to use the function, open the UI in the -extend mode. Furthermore, the function cannot be used in a second UI simultaneously since the color database is locked for writing (the error message "Read only colorDB“ is shown).

Example

The function "colorGetAlias" returns the color name of the alias "alias1" from the file "myColorDB".

main()
{
   int j;
   j = colorSetAlias("myColorDB", "alias1", "myBlue");
   int i;
   string colAlias;
   i=colorGetAlias("myColorDB", "alias1", colAlias);
   DebugN("colorGetAlias:",i );
   DebugN(colAlias);
}

Assignment

Miscellaneous functions

Availability

UI