CollectionItem.Selected

Description

Returns one of two Integers with possible values VARIANT_TRUE (-1) or VARIANT_FALSE (0) if the object is selected.

Parameters

Parameter Type Description
BranchFlag siBranchFlag is the object selected in node or branch

Default Value: siNode

Examples

VBScript Example

set oRoot = Application.ActiveProject.ActiveScene.Root
set oGroup = oRoot.AddGroup
set oMaterial = oGroup.AddMaterial("Phong")
Randomize time
if (rnd * 10) \ 5 = 1 then
SelectObj oMaterial
end if
set oItem = CreateObject("XSI.CollectionItem")
oItem.Value = oMaterial.FullName
if oItem.Selected then
logmessage "Material is selected"
else
logmessage "Material is not selected"
end if

See Also

siBranchFlag