VS:GetLine: Difference between revisions
m (1 revision) |
No edit summary |
||
Line 13: | Line 13: | ||
</funcDef> | </funcDef> | ||
<funcDef lang="py"> | <funcDef lang="py"> | ||
def vs.GetLine(): | def vs.GetLine(callback): | ||
return | return none | ||
</funcDef> | </funcDef> | ||
</def> | </def> | ||
Line 34: | Line 34: | ||
</params> | </params> | ||
----------------------------------------------------------------------------------------------------------- | |||
<remark> | |||
In Python this function will <b>NOT</b> block execution. It will execute a callback function with the resulted line (two points as callback function parameters). | |||
</remark> | |||
----------------------------------------------------------------------------------------------------------- | |||
<sample> | |||
Python sample is similar to the sample in [[VS:GetPt]]. | |||
</sample> | |||
----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ||
<seeAlso> | <seeAlso> |
Latest revision as of 19:19, 20 December 2013
.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix
Description
Procedure GetLine returns two user selected points, and draws a temporary "rubberband" line when prompting for the second point. This cannot be used if there is a function anywhere in the calling chain.
PROCEDURE GetLine(
VAR p1X,p1Y :REAL;
VAR p2X,p2Y :REAL);
def vs.GetLine(callback): return none
Parameters
p1 REAL Returns coordinates of first user click. p2 REAL Returns coordinates of second user 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
Python sample is similar to the sample in VS:GetPt.
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:GetPt]] | [[VS:GetPtL]] | [[VS:GetPt3D]] | [[VS:GetPtL3D]] | [[VS:GetLine]] | [[VS:GetLine3D]] | [[VS:GetRect]] | [[VS:GetRect3D]] |
[[VS:TrackObject]]