Filter.Subset

導入

v4.0

詳細

入力配列から作成されるオブジェクトのコレクションを戻します。フィルタの条件に一致するすべてのオブジェクトが出力コレクションとして戻されます。

スクリプト 構文

oReturn = Filter.Subset( Objects );

戻り値

XSICollection

パラメータ

パラメータ タイプ 詳細
Objects XSICollection オブジェクトのコレクション。呼び出し側でこの引数が省略された場合には、デフォルトで選択リストが使用されます。

VBScript の例

'--------------------------------------------------------------------
'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