Hello,

I've had a nice person code this small lisp for creating named views based on a rectangle for boundary and mtext string to name it. Although it works just fine I request a kind soul to make a small improvement, basically have a first input (another mtext string) to categorize the view. This would be the first input, and should be before the "while" routine...

Code:
(defun c:mynview (/ PT1 PT2 REC SEL SEL1 STR TXT)
(while (and (setq sel (entsel "\nSelect rectangle: "))
(setq rec (car sel))
(= "LWPOLYLINE" (cdr (assoc 0 (entget rec))))
(setq sel1 (entsel "\nSelect text: "))
(wcmatch (cdr (assoc 0 (setq txt (entget (car sel1))))) "*TEXT")
(setq str (cdr (assoc 1 txt)))
)
(progn
(setq pt1 (vlax-curve-getPointAtParam rec 2)
pt2 (vlax-curve-getStartPoint rec)
)
(command "_.-view" "_W" str pt1 pt2)
)
)
(princ)
)
Thanks in advance to all the help or light shed in the right direction!

Regards,

TME