TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: dussla on May 05, 2012, 04:47:41 AM
-
hello freind
i copy object and i pasted
i would like to paste object in new layer with lisp
is that good idea ?
i will wait good anwser ~ ~~~
always thank you
-
When you say paste an object. Is it only one object you've copied to clipboard? Or are you pasting as block?
It's not impossible to use lisp to change the object(s) after pasting, but I'm not too sure what you're after. Also, you mention "new layer" you you want to have a new layer created for such paste, or would the current layer do?
-
yes i paste 1 object only
-
yes i paste 1 object only
Why not change the layer when you select the object in the first place? :?
-
hello freind
i copy object and i pasted
i would like to paste object in new layer with lisp
is that good idea ?
i will wait good anwser ~ ~~~
always thank you
You did not answer me in this thread,
http://www.theswamp.org/index.php?topic=41605.msg467010#msg467010
why I want to help you with other question, dude?
-
sorry my poor explain
my work refer other dwg file often
i use other dwg file
in there , i copy object
but in many copy , many layers made
so i would like to make 1 layer only
understand ~~ ?
-
Set desired layer to be current, then try this code
(defun c:lcopy (/ ex)
(setq ex (getvar "expert"))
(setvar "expert" 0)
(command "layer" "freeze" "*" "" "" "")
(setvar "expert" 5)
(command "_copybase" "0,0" "all" "")
(setvar "expert" 0)
(command "_layer" "thaw" "*" "" "" "")
(setvar "expert" ex)
(princ)
)
Then repeat with next layer, etc
~'J'~
-
really thank you ~
really really ~
-
Happy to help
Cheers :)
~'J'~