Message 1 of 11
MATCHING PARENTHESIS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
(defun CopyLayerColor2 (ent1 ent2 / elist1 elist2); the function
(setq
elist1 (entget ent1); entity data lists
elist2 (entget ent2)
); setq
(setq elist2 (append elist2 (list (assoc 8 elist1)))); assign ent1's Layer to ent2
(setq elist2
(append elist2 ; Color adjustment
(if (assoc 62 elist1); ent1 has override [non-Bylayer] Color
(list (assoc 62 elist1)); then [give that to ent2]
'((62 . 256)); else [make ent2's Color ByLayer]
); if
); append
); setq
(entmod elist2); update properties of ent2
); defun
(defun C:CLC2 (/ en1 en2); = Copy Layer & Color 2 [whatever the 2 means]; the command
(if
(and
(setq en1 (car (entsel "\nObject to copy Layer and Color FROM: ")))
(setq en2 (car (entsel "\nObject to copy Layer and Color TO: ")))
); and
(CopyLayerColor2 en1 en2); apply those entities as arguments to the function
); if
(princ)
); defun
IN THE ABOVE EXAMPLE ALL THE PARENTHESIS ARE MATCHING RESPECTIVELY.
I WANT TO UNDERSTAND HOW IT IS DONE.
THANKS SIR (KENT) IN ADVANCE
Shreev