I have code written to change all lines to plines, but they are changing them to LW PLines and i need them to be 2D PLines. If there is a way please help.
Here is the Code
Code:
(defun PLINECONVERT (/ OLDVAR1 LCOLOR COUNT LINENO SS1 ENT EDATA PT1 PT2)
(alert "\nConverting lines to PLines\n")
(command ".undo" "Mark")
(setq OLDVAR1 (getvar "CMDECHO")) (setvar "CMDECHO" 0)
(setvar "PLINEWID" (getreal "Enter Width for Plines: "))
(setq SS1 nil)
(setq SS1 (ssget "X" ' ((0 . "LINE"))))
(setq LINENO (sslength SS1))
(setq COUNT 0)
(setq PLINFO (ssadd))
(repeat LINENO
(progn
(setq ENT (ssname SS1 COUNT))
(setq EDATA (entget ENT))
(setq PT1 ( cdr (assoc 10 EDATA)))
(setq PT2 ( cdr (assoc 11 EDATA)))
; (setq LCOLOR (cdr (assoc 62 EDATA)))
(setq LLAYER (cdr (assoc 8 EDATA)))
;(if LCOLOR (princ) (setq LCOLOR "BYLAYER"))
(command "Color" LCOLOR )
(command "Layer" "s" LLAYER "")
(command "Pline" PT1 PT2 "")
(ssadd (entlast) PLINFO)
(prompt (strcat "Processing line no. " (itoa COUNT) "\r"))
(setq COUNT (1+ COUNT))
)
)
(COMMAND "ERASE" SS1 "")
(setvar "CMDECHO" OLDVAR1)
(prompt (strcat "\n" "Erasing original lines..." "\n"))
(princ) ; end program
(terpri)
); end convert.lsp
All Help is appreciated.