vlax-curve-getDistAtPoint

(vlax-curve-getDistAtPoint ename point)

The vlax-curve-getDistAtPoint function finds the distance between the start point of the specified entity and a specified point on the entity.

Arguments

ename specifies an entity to be measured.

point specifies a point on the entity provided as a list of three floating-point numbers representing the WCS coordinates of that point.

Return Value

The function returns the measured distance as floating-point number. If the function fails, it returns nil.

Examples

Assume the most recently drawn entity is an arc starting at 0,0, passing through 1,1, and ending at 2,0:

: (setq en (entlast))

<EName:  045d4b64>

: (setq pt (list 1 1))

(1 1)

: (vlax-curve-getDistAtPoint en pt)

1.5708