CollectionItem.Singleton

Description

Returns one of two Integers with possible values VARIANT_TRUE (-1) or VARIANT_FALSE (0) if only one object of this type is allowed on its parent.

C# Syntax

// get accessor

Int32 rtn = CollectionItem.Singleton;

Examples

VBScript Example

set oRoot = Application.ActiveProject.ActiveScene.Root

set oGroup = oRoot.AddGroup

set oMaterial = oGroup.AddMaterial("Phong")

set oItem = CreateObject("XSI.CollectionItem")

oItem.Value = oMaterial.FullName

if oItem.Singleton then

logmessage "Only one Material per objects"

else

logmessage "Multiple Materials are allowed on an object"

end if

See Also

siBranchFlag