Share via


ProjectNode.clear Method

Removes the contents of a project.

Syntax

public void clear()

Run On

Called

Remarks

This method does not remove the project contents from the Application Object Tree (AOT)—only from the project itself. This method removes the project contents but does not remove the project folder.

To delete a project and its contents in one method call, use the AOTdelete method. To delete objects from the AOT, use the AOTdelete method.

Examples

The following example removes any objects in the Project1 project in the Private folder.

static void clearProjectObjects(Args _args) 
    { 
        ProjectNode privatePn; 
        ProjectNode pn; 
 
        // Navigate to the Private projects folder. 
        privatePn = infolog.projectRootNode().AOTfindChild("Private"); 
 
        // Get a reference to the project. 
        pn = privatePn.AOTfindChild("Project1"); 
 
        // Clear the project. 
        pn.clear(); 
    }

See Also

Reference

ProjectNode Class