VS:SetDSelect

From Vectorworks Developer
Revision as of 14:37, 12 August 2013 by Root (talk | contribs) (1 revision)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix

Description

Procedure SetDSelect deselects the referenced object.

PROCEDURE SetDSelect(
h :HANDLE);
def vs.SetDSelect(h):
    return None

Parameters

h HANDLE Handle to object.

Example

VectorScript

{ example from unknown author on Vectorlab, Dec 2006 }
PROCEDURE IsolateLayer; {sets selected object's layer to active and greys all others}
VAR
    x, y: Real;
    h, layHand: Handle;
    layName: STRING;
BEGIN
    GetPt(x, y);
    h := PickObject(x, y);

    IF h <> NIL THEN BEGIN
        SetSelect(h);
        layHand := GetLayer(h);
        layName := GetLName(layHand);
        Layer(layName);
        SetLayerOptions(2);

        SetDSelect(h);
    END;
END;
Run(IsolateLayer);

Python


def PickPointCallback(pt):
	h = vs.PickObject(pt[0], pt[1])
	if h != None:
		vs.SetSelect(h)
		layHand = vs.GetLayer(h)
		layName = vs.GetLName(layHand)
		vs.Layer(layName)
		vs.SetLayerOptions(2)
		vs.SetDSelect(h)
    
	

def IsolateLayer(): #{sets selected object's layer to active and greys all others}
    vs.GetPt( PickPointCallback )
    
IsolateLayer()

Version

Availability: from All Versions