Filter.Subset

Introduced

v4.0

Description

Returns a collection of objects built from the input array. All objects matching the filter requirements are returned through an output collection.

C# Syntax

CXSICollection Filter.Subset( Object in_pObjects );

Scripting Syntax

oReturn = Filter.Subset( Objects );

Return Value

XSICollection

Parameters

Parameter Type Description
Objects XSICollection A collection of objects. By default the selection list is used, if this argument is omitted by the caller.

Examples

VBScript Example

'--------------------------------------------------------------------
'This example shows how to use the Subset method
'
' README: install the example from the filter object help 
' page before running this example.
'--------------------------------------------------------------------
set f = Application.Filters("LargeMesh")	
if ( typename(f) <> "Nothing" ) then
	set model = ActiveSceneRoot
	set cone = model.AddGeometry( "Cone", "MeshSurface" )
	set cube = model.AddGeometry( "Cube", "MeshSurface" )
	set sphere = model.AddGeometry( "Sphere", "MeshSurface" )
	set phong = sphere.AddMaterial( "phong" )
	Selection.Add cone
	Selection.Add cube
	selection.Add sphere
	Selection.Add phong	
	set subset = f.Subset(Selection)
	LogMessage  f.name & ".Subset("&Selection.GetAsText&"): " & subset.GetAsText
	'Output of above script:
	'INFO : "LargeMesh.Subset(cone,cube,sphere): sphere"
end if