 - ;直线的虚实线型变换
- (defun c:xsbh( / ent el LineType LayerName)
- (prompt "\n选择需要虚实线型变化的实体:")
- (while (setq ent (car (entsel)))
- (setq el (entget ent))
- ;如果bylayer,则需要从层表中得到线型名称
- (if (= (setq LineType (cdr (assoc 6 el))) nil)
- (progn
- (setq LayerName (cdr (assoc 8 el)))
- ;返回指定图层的线型名称
- (setq LineType (cdr (assoc 6 (tblsearch "layer" LayerName))))
- );progn
- );if
- (if (or (= LineType "CONTINOUS")
- (= LineType "CONTINUOUS")
- (= LineType "ByBlock"));字母大小写
- (setq el (append (list (cons 6 "DASHED")) (reverse el))
- el (reverse el))
- );if
- (if (= LineType "DASHED")
- (setq el (append (list (cons 6 "CONTINOUS")) (reverse el))
- el (reverse el))
- );if
- (entmod el)
- );while
- (princ)
- );defun
工作需要,随手写的。尚未考虑复杂情况。与探索者中“虚实变换”功能的差别是点击实体之后立即修改,不需要回车确认。 |