For those of you who like to use the MLINE command, this is for you. For those who don’t know what the MLINE command is – It lets you create 2 parallel lines and you get to specify the distance between the 2 lines. And for anyone who doesn’t have the full version of AutoCAD and uses AutoCAD LT the DLINE does essentially the same thing. But to be honest, I really don’t like the MLINE command because it is hard to edit.
The featured LISP routine was made by LEE-Mac and acts like the MLINE command and even lets you use an existing MLINE style if you have one set up. But the great thing about this version of the MLINE command is that it creates two parallel Poly Lines. This makes it so much easier to edit than trying to edit an MLINE.
- ML2 <enter> to start
- S <enter> to set the “Scale” (width) of the new MLINE.
- J <enter> to specify the “Justification” of the new MLINE.
- Place your New & Improved MLINE
; Works like MLINE but it draws PLines instead ; way better than MLINE ; by LEE-MAC found at CADTutor.net (defun c:ML2 ( / *error* vl ov LastEntity ent ss ) ;; © Lee Mac ~ 19.06.10 (defun *error* ( msg ) (mapcar 'setvar vl ov) (or (wcmatch (strcase msg) "*BREAK,*CANCEL*,*EXIT*") (princ (strcat "\n** Error: " msg " **"))) (princ) ) (setq vl '("CMDECHO" "PEDITACCEPT" "QAFLAGS") ov (mapcar 'getvar vl)) (setq LastEntity (entlast)) (command "_.mline") (while (= 1 (logand 1 (getvar 'CMDACTIVE))) (command pause) ) (if (not (equal LastEntity (setq ent (entlast)))) (progn (mapcar 'setvar vl '(0 1 5)) (vl-cmdf "_.explode" ent "") (setq ss (ssadd)) (mapcar '(lambda ( e ) (ssadd e ss)) (LM:EntnexttoEnd ent)) (vl-cmdf "_.pedit" "_M" ss "" "_J" "" "") ) ) (mapcar 'setvar vl ov) (princ) ) (defun LM:EntnexttoEnd ( e ) (if (setq e (entnext e)) (cons e (LM:EntnexttoEnd e)) ) )