Creates a group and returns a group handle, or gets the group handle of an existing group. After you open a group, you can use the group number in functions that use groups, for example, SetArea() and AlarmSetInfo(). You can open a group that is specified in the Groups database. You can also create groups at runtime.
When you open a group that is defined in the database, a copy of the group is made - the original group is not used. You can therefore change the values in the group without affecting other facilities that use this group.
The name of the group to open.
The mode of the open:
0 - Open an existing group
1 - Create a new group
2 - Attempts to open an existing group. If the group does not exist, it will create it.
The group handle , or -1 if the group cannot be created or opened. The group handle identifies the table where all data on the associated group is stored.
! Open Plantwide group defined in the database.
! Set current user area to Plantwide.
! Set area to 1...10, 20 and 25 by creating a new group.