(defun C:convert_solid_in_polyline ( / nabor ttt n)
  ;заменяет объект SOLID на за замкнутую полилинию
  (load_global_variable)
  (setq nabor(ssget "_X"'((0 . "SOLID"))))
  (setq n 0)
  (repeat (sslength nabor)
    (setq ttt (entget(ssname nabor n)))
    (if (cdr (assoc 62 ttt))
      (entmake (list '(0 . "LWPOLYLINE")
		     '(100 . "AcDbEntity")
		     '(6 . "Continuous")
		     '(100 . "AcDbPolyline")
		     '(90 . 4) '(70 . 1)
		     (cons 8 (cdr (assoc 8 ttt)))
		     (cons 62 (cdr (assoc 62 ttt)))
		     (cons 10 (cdr (assoc 11 ttt))) (cons 10 (cdr (assoc 10 ttt)))
		     (cons 10 (cdr (assoc 12 ttt))) (cons 10 (cdr (assoc 13 ttt)))))
      (entmake (list '(0 . "LWPOLYLINE")
		     '(100 . "AcDbEntity")
		     '(6 . "Continuous")
		     '(100 . "AcDbPolyline")
		     '(90 . 4) '(70 . 1)
		     (cons 8 (cdr (assoc 8 ttt)))
		     (cons 10 (cdr (assoc 11 ttt))) (cons 10 (cdr (assoc 10 ttt)))
		     (cons 10 (cdr (assoc 12 ttt))) (cons 10 (cdr (assoc 13 ttt)))))
      )
    (entdel (ssname nabor n))
    (setq n (1+ n))
    )
  )