VS:GetLW

From Vectorworks Developer
Jump to navigation Jump to search

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

Description

Function GetLW returns the line weight of the referenced object. The value returned represents the width in mils.

FUNCTION GetLW(
h :HANDLE) : INTEGER;
def vs.GetLW(h):
    return INTEGER

Parameters

h HANDLE Handle to object.

Remarks

Criteria searching by lineweight works differently. An object with a lineweight by class can be found with this:

SelectObj((LW<.0000000000002)); Then you can use GetLW to determine the actual lineweight.

orso: (1 mil = 1/1000 in)

Example

VectorScript

PROCEDURE GetLWExample;
VAR
    x, y : REAL;
    h : HANDLE;
BEGIN
    GetPt(x, y);
    h := PickObject(x, y);

    IF h <> NIL THEN
        Message(GetLW(h));
END;
RUN(GetLWExample);

Python


def PickPointCallback(pt):
	h = vs.PickObject(pt[0], pt[1])
	if h != None:
		vs.Message(vs.GetLW(h))
	

def GetLWExample():
	vs.GetPt( PickPointCallback )
    
GetLWExample()

Version

Availability: from All Versions