more (command "line".....

In the following code, npnts is a flat list of selection set indices for 7 points derived by sorting apntdl (a larger list of lists), apnts is a selection set of points, and pti is a central point from which 7 lines are expected to be drawn. (setq npnts (mapcar 'car (sort_on_last apntdl 7)))(setq len (length npnts))The following code places grips on pti and ptj the first time through (command "line".., and then stops w/ error: function cancelled (command "line" ...(repeat len(setq pjdex (car npnts))(setq ptj (cdr (assoc 10 (entget (ssname apnts pjdex)))))(command "line" pti ptj "")(setq npnts (cdr npnts)))The following code places grips on pti and ptj the first time through (command "line".., w/out drawing the line, and then proceeds to draw the remaining 6 lines, and stops leaving the grips showing.Any help? Thanks