- (defun c:tt () ; 图元原地复制变色到。原图层名加后缀
- (VL-LOAD-COM)
- (setq ss (car (entsel "\n 只能单选图元")))
- (setq ss-en (entget ss))
- (setq AcadObject (vlax-get-acad-object)
- AcadDocument (vla-get-ActiveDocument AcadObject)
- mSpace (vla-get-ModelSpace AcadDocument)
- )
- (setq LayerSel (vla-get-Layers AcadDocument))
- (setq testLayer (vla-add LayerSel
- (STRCAT
- (cdr (assoc 8 ss-en)
- )
- "--复制"
- )
- )
- )
- (setq mm (vla-get-Name testLayer))
- (command "copy" ss "" '(0 0) "")
- (command "chprop"
- (entlast)
- ""
- "la"
- (vla-get-Name testLayer)
- "C"
- "6"
- ""
- )
- (princ)
- )
|