XSICollection.RemoveAll

Description

Removes all items from (empties) the collection. Compare this method to XSICollection.Remove, which only removes a single item at a time and XSICollection.RemoveItems which removes one or more items at a time.

C# Syntax

XSICollection.RemoveAll();

Scripting Syntax

XSICollection.RemoveAll();

Examples

VBScript Example

Dim oColl		' object pointer for collection
' Create the new collection & populate it
Set oColl = CreateObject( "XSI.Collection" )
oColl.SetAsText "Light,Camera"
' Test contents 
checkContents oColl
' Now clear (empty) the collection & re-test it
LogMessage "----------------"
oColl.RemoveAll
checkContents oColl
'--------------------------------------------------
function checkContents( in_coll )
	If in_coll.Count > 0 Then
		LogMessage "Collection now contains " & in_coll.GetAsText 
	Else
		LogMessage "Collection is empty."
	End If
end function
'--------------------------------------------------
' Output of above script:
'INFO : "Collection now contains light,Camera"
'INFO : "----------------"
'INFO : "Collection is empty."

See Also

XSICollection.Remove XSICollection.RemoveItems