gp_PathData variable to the gp:drawOutline function by invoking the function as follows:
You can pass the association list in the(gp:drawOutline gp_PathData)
Simple enough, but you also need to figure out how to process the information stored in the association list. The VLISP Inspect feature can help you determine what to do.
To use the VLISP Inspect feature to analyze your association list
(setq BoundaryData (gp:getPointInput))
BoundaryData.
VLISP will store the information you provide in a variable named
VLISP displays a window like the following:
BoundaryData variable.
The Inspect window shows you each sublist within the(assoc 50 BoundaryData)
assoc function returns the entry in the association list that is identified by the specified key. In this example, the specified key is 50; this is associated with the angle of the garden path (see Putting Association Lists to Use for a list of the key-value pairs defined for this application).
The(cdr(assoc 50 BoundaryData))
cdr function returns the second element, and any remaining elements after that, from a list. In this example, cdr retrieves the angle value, which is the second and last element in the entry returned by the assoc function.
TheBy this point, you should have no trouble understanding the following code fragment:
(setq PathAngle (cdr (assoc 50 BoundaryData))
Width (cdr (assoc 40 BoundaryData))
HalfWidth (/ Width 2.00)
StartPt (cdr (assoc 10 BoundaryData))
PathLength (cdr (assoc 41 BoundaryData))