VS:GetPtL

From Vectorworks Developer
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

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

Description

Procedure GetPtL creates a temporary "rubberband" line from a specified point to the user selected end point. This cannot be used if there is a function anywhere in the calling chain.

PROCEDURE GetPtL(
p1X,p2Y :REAL;
VAR p2X,p2Y :REAL);
def vs.GetPtL(callback):
    return None

Parameters

p1 REAL Coordinates of line start point.
p2 REAL Returns coordinates of mouse click.

Remarks

In Python this function will NOT block execution. It will execute a callback function with the resulted line (two points as callback function parameters).

Example

VectorScript

PROCEDURE Example;
VAR
pt1, pt2 :VECTOR;
BEGIN
GetPt(pt1.x, pt1.y);
GetPtL(pt1.x, pt1.y, pt2.x, pt2.y);
MoveTo(pt1.x, pt1.y);
LineTo(pt2.x, pt2.y);
END;
RUN(Example);

Python sample is similar to the sample in VS:GetPt.

Python


Version

Availability: from All Versions

See Also

VS Functions:

VS:GetPt | VS:GetPtL | VS:GetPt3D | VS:GetPtL3D | VS:GetLine | VS:GetLine3D | VS:GetRect | VS:GetRect3D | VS:TrackObject

VS Functions:

[[VS:GetPt]] | [[VS:GetPtL]] | [[VS:GetPt3D]] | [[VS:GetPtL3D]] | [[VS:GetLine]] | [[VS:GetLine3D]] | [[VS:GetRect]] | [[VS:GetRect3D]] |

[[VS:TrackObject]]