| OPC Toolbox™ | ![]() |
NewObj = copyobj(Obj)
NewObj = copyobj(Obj, ParentObj)
NewObj = copyobj(Obj) makes a copy of all the objects in Obj, and returns them in NewObj. Obj can be a scalar OPC Toolbox object, or a vector of toolbox objects.
NewObj = copyobj(Obj, ParentObj) makes a copy of the objects in Obj inside the parent object ParentObj. ParentObj must be a valid scalar parent object for Obj. If any objects in Obj cannot be created in ParentObj, a warning will be generated.
A copied toolbox object contains new versions of all children, their children, and any parents that are required to construct that object. A copied object is different from its parent object in the following ways:
The values of read-only properties will not be copied to the new object. For example, if an object is saved with a Status property value of 'connected', the object will be recreated with a Status property value of 'disconnected' (the default value). You can use propinfo to determine if a property is read-only. Specifically, a connected opcda object is copied in the disconnected state, and a copy of a logging dagroup object is not reset to the logging state.
A copied dagroup object that has records in memory from a logging session is copied without those records.
![]() | connect | delete | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |