VS:GetLocPt
.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix
Description
Procedure GetLocPt returns the coordinate location of the referenced locus.
PROCEDURE GetLocPt(
h :HANDLE;
VAR pX,pY :REAL);
def vs.GetLocPt(h): return p
Parameters
h HANDLE Handle to locus. p REAL Coordinates of locus point.
Example
VectorScript
PROCEDURE TEST; VAR pt : VECTOR; BEGIN Message( 'Set begin point' ); CallTool( -221 ); { activates the locus tool } GetLocPt( FSActLayer, pt.x, pt.y ); Message( pt ); END; Run(TEST);
Python
locObj = vs.FSActLayer() # make sure a locus is selected or there will be an error. # Due to the nature of Python, CallTool from the example above # is not usable for fetching LSActLayer in the same running script. if locObj!= vs.Handle() and vs.GetTypeN( locObj ) == 17: pt = vs.GetLocPt( locObj ) vs.AlrtDialog( str(pt) ) else: vs.AlrtDialog( 'Select a locus' )
Version
Availability: from All Versions