Copy method: Tree Structure class

Syntax

Copy(FromStructId, ToStructId)

Description

The Copy method copies the tree structure specified with FromStructId to the tree structure specified with ToStructId. Both parameters take string values. The tree structure specified by ToStructId must be a new tree structure. You receive an error if the tree structure already exists.

The Copy method can only be used with a closed tree structure, it cannot be used on an open tree structure. Before you use the Copy method, you must explicitly close any open tree structure objects (with the Close method.) You receive an error if there are any open tree structures.

To access the new tree structure, you must use the Open method.

Returns

A number; 0 if the method completed successfully.

Example

&MyTreeStruct = &MySession.GetTreeStructure(); 
&RetValue = &MyTreeStruct.Copy(PERSONAL_DATA, PERSONAL_DATA2);