I've wrapped up mleader command into a function.
How might I return in a list of points, the points that were selected by the user?
(defun MySchTag (/ pntlst)
(command "mleader")
(while (eq 1 (logand 1 (getvar "cmdactive")))
(command pause)
)
)
@mdhutchinson wrote:I've wrapped up mleader command into a function.
How might I return in a list of points, the points that were selected by the user?
(defun MySchTag (/ pntlst)
(command "mleader")
(while (eq 1 (logand 1 (getvar "cmdactive")))
(command pause)
))
I have too old a version to have multileaders, but any time you have a list of points [I assume that's what your pntlst variable would be] that you want to use sequentially in a command, you can do it this way:
(command "_.whatever" ;;; possibly some options, etc. ;;;); leaves with command active
(foreach pt pntlst
(command pt); feeds it out to the command
); end foreach
(command ;;; whatever is needed to complete the command ;;;)
and similarly with other kinds of things if contained in a list.
If you're wondering how to get the list of points from the User, try something like this before doing the above:
(while (setq pt (getpoint "\nSelect point: "))
(setq pntlst (append pntlst (list pt)))
)
@mdhutchinson wrote:I've wrapped up mleader command into a function.
How might I return in a list of points, the points that were selected by the user?
One way is to retrieve the vertices after mleader is created
(defun c:MySchTag (/ pntlst) (command "mleader") (while (eq 1 (logand 1 (getvar "cmdactive"))) (command pause) ) (setq pntlst (vlax-invoke (vlax-ename->vla-object (entlast)) 'GetLeaderLineVertices 0 ) ) )
HTH
[Never mind my previous post -- I now think I misunderstood what you wanted to do.]