Procedure GetPt3D switches the cursor to 3D selection mode and allows the user to select a point in a VectorWorks document. This cannot be used if there is a function anywhere in the calling chain.
PROCEDURE GetPt3D(
VAR pX, pY, pZ : REAL;
useWPOnly : BOOLEAN);def vs.GetPt3D(useWPOnly, callback):
return None| Name | Type | Description |
|---|---|---|
| pX, pY, pZ | REAL | Returns coordinates of mouse click. |
| useWPOnly | BOOLEAN | TRUE if the returned point have to be on the active Working Plane. Snapping to arbitrary 3D geometry will produce vertical projection result on the WP; FALSE if the point can be arbitrary 3D point (produced, for example, by snapping to a 3D geometry) |
(_c_, 2011.01.09) the z-value of the returned 3D point is always zero if
- the current view is Top-plan or Top (From Raymond Mullin).
- there is no pre-existing snapped geometry in 3D (by useWPOnly = FALSE)
In Python this function will NOT block execution. It will execute a callback function with the resulted point (as callback function parameter).
on sample is similar to the sample in GetPt.
BEGIN
DSelectAll;
GetPt3D( pt.x, pt.y, pt.z, TRUE );
h := CreateCustomObjectN( 'HumanFigure', pt.x, pt.y, 0,False );
END;
BEGIN
IF ResourceIsOK THEN
GetOrigin(origin.x, origin.y);
SetOriginAbsolute(0, 0);
GetPt3D(pt1.x, pt1.y, pt1.z, false);
{GetPt(pt1.x, pt1.y);}
crit := '(R IN [''Space''])';
polyCnt := Count(crit);
{ AlrtDialog(CONCAT('Space Link Tool: polyCnt = ', polyCnt)); }
Redraw;
Message( GetPlugInString(3009) );
GetOrigin(xOrg,yOrg);
SetOriginAbsolute(0,0);
GetPt3D( x, y, z, FALSE );
SetOriginAbsolute(xOrg,yOrg);
ClrMessage;
IF DTM6_GetZatXY( hDTMObject, gModelType, xOrg+x, yOrg+y, z ) THEN
BEGINimport vs
# Procedure GetPt3D switches the cursor to 3D selection mode and allows the
# user to select a point in a VectorWorks document.
def handle_object(objHandle):
vs.Message('Processing: ' + str(objHandle))
useWPOnly = True
callback = handle_object
vs.GetPt3D(useWPOnly, callback)VS Functions: GetPt | GetPtL | GetPt3D | GetPtL3D | GetLine | GetLine3D | GetRect | GetRect3D | TrackObject
Availability: from Vectorworks 2010