VS:MouseDown

From Vectorworks Developer
Revision as of 03:32, 9 July 2019 by MaKro (Talk | contribs)

Jump to: navigation, search

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

Description

Function MouseDown returns TRUE if a mouse down event has occurred within the active document window.

Remark for VW2014 python: return value for the point is always an empty tuple (0, 0)

FUNCTION MouseDown(
VAR pX,pY  :REAL) : BOOLEAN;
def vs.MouseDown():
    return (bool, (px, py))

Parameters

p REAL Returns coordinates of mouse click.

Example

VectorScript

REPEAT
UNTIL MouseDown(x1,y1);
REPEAT
UNTIL MouseDown(x2,y2);
MoveTo(x1,y1);
LineTo(x2,y2);

Python

down = False
while not down:
    down, pt = vs.MouseDown()  # pt is a tuple (x, y)

vs.AlrtDialog(str(pt))

Version

Availability: from All Versions
Personal tools
NamespacesFFFF

Variants
Actions
Advanced Search
See Also
Navigation
Toolbox