Skip to content

Latest commit

 

History

History
61 lines (48 loc) · 1.13 KB

File metadata and controls

61 lines (48 loc) · 1.13 KB

GetLW

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

Name Type Description
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.

[[User:Orso.b.schmid| orso]]: (1 mil = 1/1000 in)

Examples

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

Category