Returns the number of items present in the scene matching the specified type.
Object DataRepository.GetCount( Object in_varObject, siDataFilterType in_filterType ); |
oInteger = DataRepository.GetCount( Object, [Filter] ); |
Parameter | Type | Description |
---|---|---|
Object | Object or String | Object to count or string containing the CLSID of the object to count. |
Filter | siDataFilterType | Specify if what kind of items should be filtered.
Default Value: siAllData |
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 |