试试这个:
- (defun c:foo (/ s)
- ;; RJP » 2022-09-09
- ;; Generate vertical xlines on polyline vertexes
- (if (setq s (ssget '((0 . "LWPOLYLINE"))))
- (progn (foreach e (vl-remove-if 'listp (mapcar 'cadr (ssnamex s)))
- (foreach p (vl-remove-if '(lambda (x) (/= 10 (car x))) (entget e))
- (entmakex (list '(0 . "XLINE") '(100 . "AcDbEntity") '(67 . 0)
- '(8 . "XLINE") '(100 . "AcDbXline") p
- '(11 0.0 1.0 0.0)
- )
- )
- )
- )
- ;; Make layer not plot and color 128,128,128
- (entmod (append (entget (tblobjname "LAYER" "XLINE")) '((290 . 0) (420 . 8421504))))
- )
- )
- (princ)
- )
|