(getdist [point] [prompt])


Ask the user to specify two points.


This function prompts the user to enter a distance, or to pick one or two points to specify the distance. The distance returned is a real number, regardless of the current distance format specified by the Units command. You can specify a prompt string to be displayed, asking the user for input. Another LISP expression cannot be entered in response to getdist.

Examples

The examples in this section demonstrate the two ways to use the getdist function.

  1. Two-point method: leave out the point argument. The getpoint function prompts the user for two points. The prompt for the first point is specified by prompt; progeCAD prompts, "Second point:" for the second pick point. A guide line stretches from the first point to the target to visually help in picking the second point.

Code Returns
(getdist)
[pick first point]
[pick second point]
no prompt
Second point:
7.2
(getdist "Length of street: ")
[pick first point]
[pick second point]
Length of street:
Second point:
10.5

2.     One-point method: include the point argument. The getpoint function prompts the user for one point. The prompt for the second point is specified by prompt. A guide line stretches from the first point to the target to visually help in picking the second point.

Code Returns
(getdist '(7.0 2.0))
[pick point]
no prompt
5.3
(getdist '(3.0 2.0) "Length of pipe: "))
[pick point]
Length of pipe:
2.8

NOTE For more information, see the initget function.

Tell me about...

(getangle [point] [prompt])

(getcorner point [prompt])

(getpoint [point] [prompt])

LISP Compatibility

Programming Overview of LISP (LISt Processing) Language