Function NumSObj returns the number of selected objects on the referenced layer.
FUNCTION NumSObj(h : HANDLE): LONGINT;def vs.NumSObj(h):
return LONGINT| Name | Type | Description |
|---|---|---|
| h | HANDLE | Handle to layer. |
BEGIN
SetName(GetLayerByName(ExistLayer[(LayerMaping[I,1]),1]),NewLayer[I,1]);
IF kDebugText THEN Writeln ( 'Renamed : Old ',ExistLayer[(LayerMaping[I,1]),1],'New ',NewLayer[I,1],' Num of Elements ',NumSObj(ActLayer));
END
BEGIN
IF ( NumSObj( GetLayer ( objHand ) ) > 1 ) THEN
BEGIN
vsoWidgetSetEnable( 1, FALSE );
END
END; {NOT End of Infile}
Wait(1);
ClrMessage;
Close(InFile);
IF (NumSObj(ActLayer) > 0) THEN
BEGIN
AlrtDialog(GetPlugInString(5006));
END;import vs
# Function NumSObj returns the number of selected objects on the referenced
# layer.
h = vs.FSActLayer() # handle to the first selected object on the active layer
count = vs.NumSObj(h)
vs.Message('NumSObj returned: ' + str(count))Availability: from All Versions