- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I have made a code to select the text, set the layer current, move the text and draw an arrow to its position from its original position and in the layer of the text. The code I have asks for the selection twice.
Please let me know how to reduce the selection to 1 time.
(Defun c:Tpx (/ pt1 pt2) ;
(WHILE T
(setvar "cmdecho" 0)
(setq entlist (entget (car (entsel "\nSelect object: "))))
(setvar "clayer" (cdr (assoc 8 entlist)))
(setq txt (car (entsel "\nSelect object: ")))
(if txt
(progn
(setq elist (entget txt)); entity list
(setq IP (cdr (assoc 10 elist))); Insertion Point
); progn
); if
(setq IP2 (getpoint "\nPick Next point: "))
(command "move" txt "" ip IP2 "")
(command "_.leader" IP IP2 "_a" "" "_n")
)
)
Solved! Go to Solution.