Clone group into new private group on same client
NewGObj = clonegroup(GObj,'NewName')
NewGObj = clonegroup(GObj,'NewName') clones
dagroup object specified by
making a private group
NewGObj with name
be a unique group name.
GObj can be a private group
or a public group.
The new group
NewGObj is independent of the
original group, but with the same parent (
and the same items as that group. All the group and item properties
are duplicated with the exception of the following:
Active property is configured
GroupType property is configured
Not all OPC data access servers support the cloning of groups.
To use this functionality, your server must support public groups.
If you try to clone a group on a server that does not support public
groups, an error is generated. To verify that a server supports public
groups, use the
on the client connected to that server: Look for an entry
clonegroup primarily when you want
to create a private duplicate of a public group that you can then
modify. If you want to create a copy of a group in another client,
Create a fictitious client, and configure a group with two items. Do not connect to the server.
da = opcda('localhost','Dummy.Server'); grp1 = addgroup(da,'OriginalGroup'); itm1 = additem(grp1,'Device1.Item1'); itm2 = additem(grp1,'Device1.Item2');
Clone the group.
grp2 = clonegroup(grp1,'ClonedGroup');