groupCreate()
Creates a new data point group and passes the name of the created data point of the group as well as the error code via parameters.
Synopsis
void groupCreate(langString ls, bool bPrivate, string &newGroup, bool
main, int &iError);
Parameters
Parameter | Description |
---|---|
ls | Name of the data point group. |
bPrivate |
Defines the type of the data point group. TRUE= Private data point group. FALSE = Public data point group. |
newGroup |
Return value. Name of the data point of the new group with the syntax "_DpGroup<NNNNN>_<type>". If the limit of 7999 groups is reached, the function will search for an available group ID starting from the first group. If an available group ID is found, it is used. If no group indices are available, a new group can be created after you delete a group. |
main |
Defines whether the new group should belong to the main group. TRUE = Main group (_DpGroup<NNNNN>_<type>.Level=1) FALSE = Not main group (_DpGroup<NNNNN>_<type>.Level=0) |
iError |
Return value. Error code (see below). |
Return value
Name of the data point of the created data point group and the error code.
Error
The return value of the iError parameter indicates whether an error occurred during the creation of the data point group. The following error codes are available:
-
0 = OK, group was created without any failures
-
-1 = The user has not the permission to create a data point group
-
-8 = maximum number of data point groups reached
-
-9 = Group already exists
-
-10 = The name of the data point group is empty (ls parameter)
Description
Creates a new data point group and passes the name of the created data point of the group as well as the error code via parameters.
Example
The data point group MyDpGroup will be created.
main()
{
string newGroup;
int err;
groupCreate("MyDpGroup", false, newGroup, false, err);
DebugN(newGroup, err);
//Returns for example: ["_DpGroup00016_Public"][0]
}
Assignment
Data point function
Availability
CTRL