Skip to content

Latest commit

 

History

History
62 lines (51 loc) · 1.22 KB

File metadata and controls

62 lines (51 loc) · 1.22 KB

Selected

Description

Function Selected returns the selection status of the referenced object.

FUNCTION Selected(h : HANDLE): BOOLEAN;
def vs.Selected(h):
    return BOOLEAN

Parameters

Name Type Description
h HANDLE Handle to object.

Examples

IF (GetType (h) = 6) AND (Selected (h)) THEN
BEGIN
	isArc := TRUE;
	objH := h;
END

BEGIN
	IF  ( ( bOnlySelected & Selected( textH )) | ( NOT bOnlySelected ) ) &
		( ObjLayerAndClassCheck( textH, SuportedLayers, SuportedClasses ) ) &
		( KeyNoteCheck( textH ) ) THEN BEGIN
		{save the handle of the text block object}
		tBlCnt := tBlCnt + 1;
		arrTBlocksH[ tBlCnt ] := textH;
		arrTBlocksUsed[ tBlCnt ] := FALSE;
	END;

BEGIN
	IF ((GetType (h) = 3) OR (GetType (h) = 5)) AND (Selected (h)) THEN
	BEGIN
		polyH := h;
		isPolyOrRect := TRUE;
	END
import vs

# Function Selected returns the selection status of the referenced object.
h = vs.FSActLayer()  # handle to the first selected object on the active layer

ok = vs.Selected(h)
if ok:
    vs.Message('Selected succeeded')
else:
    vs.Message('Selected failed')

Version

Availability: from All Versions

Category