DataRepository.GetCount

説明

シーン内に存在する、指定されたタイプと一致する項目の数を戻します。

スクリプト 構文

oInteger = DataRepository.GetCount( Object, [Filter] );

戻り値

Integer

パラメータ

パラメータ タイプ 詳細
オブジェクト オブジェクトまたはString 数えるオブジェクト、または数えるオブジェクトの CLSID を含む文字列。
フィルタ siDataFilterType フィルタリングする項目の種類を指定します。

デフォルト値:siAllData

VBScript の例

set oDatabase = XSIUtils.DataRepository
set oSphere = CreatePrim( "Sphere", "MeshSurface" )
' Count the total number of 3D Objects in the scene
Application.LogMessage oDatabase.GetCount( oSphere )
CreatePrim "Sphere", "MeshSurface"
set oSphereMesh = GetValue( "Sphere.polymsh.geom.sphere" )
' Count the number of spheres under the scene root
Application.LogMessage oDatabase.GetCount( oSphereMesh, siSceneRootData )
' Expected result:
'INFO : 25
'INFO : 2