DataRepository.GetCount

説明

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

C#構文

Object DataRepository.GetCount( Object in_varObject, siDataFilterType in_filterType );

スクリプト構文

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

戻り値

Integer

パラメータ

パラメータ タイプ 説明
Object オブジェクトまたはString 数えるオブジェクト、または数えるオブジェクトの CLSID を含む文字列。
Filter 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