ProjectItem.Selected operator

Description

Returns or sets a Boolean value indicating whether the object is selected (true) or not (false).

Note: Since Python does not support input parameters on properties, this property will fail in Python. Use the ProjectItem.IsSelected method and the ProjectItem.SetAsSelected method for Python instead.

C# Syntax

// get accessor
Boolean ProjectItem.get_Selected( UInt32 newVal );
// set accessor
ProjectItem.set_Selected( UInt32 newVal, Boolean pVal );

Parameters

Parameter Type Description
BranchFlag siBranchFlag Specifies whether the object is node-selected or branch-selected.

Applies only to objects such as X3DObject and Models that have children.

Default Value: siNode

Examples

VBScript Example

' 
' This example demonstrates how to determine if the object is node or branch selected.
' 
NewScene , false
set oSphere = Application.ActiveProject.ActiveScene.Root.AddGeometry( "Sphere", "NurbsSurface" )
if oSphere.Selected then
	Application.LogMessage "Sphere is selected"
else
	Application.LogMessage "Sphere is NOT selected"
end if
SelectObj "sphere", "BRANCH", True
if oSphere.Selected(1) then
	Application.LogMessage "Sphere is branch-selected"
else
	Application.LogMessage "Sphere is NOT branch-selected"
end if
' Expected result:
'INFO : Sphere is NOT selected
'INFO : Sphere is branch-selected

See Also

ProjectItem.IsSelected ProjectItem.SetAsSelected SelectObj