IsClassOf (SIObject) *

Introduced

5.0

Description

Returns true if the object implements the class identified by the siClassID. The method allows you to test which classes an object can implement and reflects the hierarchy illustrated in the object's documentation. For example, the ProxyParameter class supports its own properties and methods, but also the properties and methods of the Parameter class and the SIObject class. This means that IsClassOf returns true for siProxyParameterID, siParameterID and siObjectID. On the other hand, a proxy parameter is not a X3DObject, so IsClassOf would return false for siX3DObjectID.

This method is very similar to the Application.ClassName method with the exception that it takes an siClassID instead of a string and you can test for all the classes implemented by a class.

Note: The VBScript TypeName() function and JScript typeof() function can also be used to report the type name of simple data types such as a string or integer. For objects, the TypeName() function will give the same result as the Application.ClassName method but the typeof() function will only return 'object', the typeof() function will also return 'object' for variables set to 'null'.

The C++ API has an equivalent methods: SIObject::IsA and SIObject::IsA and take exactly the same siClassID constant.

Scripting Syntax

SIObject.IsClassOf( ClassID )

C# Syntax

Boolean SIObject.IsClassOf( siClassID );

Parameters

Parameter

Type

Description

ClassID

siClassID

The classid to compare with

Return Value

Boolean

Examples

• See SIObject.IsClassOf.1.js

• See SIObject.IsClassOf.2.js



Autodesk Softimage 2011