GetCount (DataRepository)

Description

Returns the number of items present in the scene matching the specified type.

Scripting Syntax

DataRepository.GetCount( Object, [Filter] )

C# Syntax

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

Parameters

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

Return Value

Integer

Examples

VBScript Example

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


Autodesk Softimage v7.5