method Elements.Clear ()
Removes all objects in a collection.

TypeDescription
Use the Clear method to remove all elements from the surface. Use the Remove method to remove a specific element from the Elements collection. The RemoveElement event occurs once the element has been removed from the Elements collection. Use the RemoveSelection method to remove the selected elements. Removing and element removes the incoming and outgoing links as well. Use the RemoveElement event to release any extra data associated with the element.