这还包括样条曲线:
- (defun c:mfrz (/ lay doc ss1 sel1 ss2 sel2)
- (vl-load-com)
- (setq lay
- (vla-get-layers
- (setq doc
- (vla-get-ActiveDocument
- (vlax-get-acad-object)))))
- (mapcar
- (function
- (lambda (Name)
- (if (not (tblsearch "LAYER" Name))
- (vla-put-freeze
- (vla-add lay Name) :vlax-true))))
- '("SYSM LAYER" "N-LNWK-MEDM LAYER"))
- (prompt "\nSelect Blocks for Layer: 'SYSM LAYER' ...")
- (if (setq ss1 (ssget '((0 . "INSERT") (66 . 1))))
- (progn
- (vlax-for Obj (setq sel1 (vla-get-ActiveSelectionSet doc))
- (vla-put-layer Obj "SYSM LAYER"))
- (vla-delete sel1)))
- (prompt "\nSelect Objects for Layer: 'N-LNWK-MEDM LAYER' ...")
- (if (setq ss2 (ssget '((0 . "ARC,*LINE,CIRCLE"))))
- (progn
- (vlax-for Obj (setq sel2 (vla-get-ActiveSelectionSet doc))
- (vla-put-layer Obj "N-LNWK-MEDM LAYER"))
- (vla-delete sel2)))
- (princ))
|