TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: dussla on May 05, 2012, 04:47:41 AM

Title: copy base to new layer paste ?
Post 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
Title: Re: copy base to new layer paste ?
Post by: irneb on May 05, 2012, 04:57:40 AM
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?
Title: Re: copy base to new layer paste ?
Post by: dussla on May 05, 2012, 05:07:46 AM
yes i paste  1 object only


Title: Re: copy base to new layer paste ?
Post by: Lee Mac on May 05, 2012, 05:33:23 AM
yes i paste  1 object only

Why not change the layer when you select the object in the first place?  :?
Title: Re: copy base to new layer paste ?
Post by: fixo on May 05, 2012, 05:35:06 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
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?
Title: Re: copy base to new layer paste ?
Post by: dussla on May 05, 2012, 11:12:04 AM
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 ~~ ?
Title: Re: copy base to new layer paste ?
Post by: fixo on May 05, 2012, 01:17:43 PM
Set desired layer to be current, then try this code
Code: [Select]
(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'~
Title: Re: copy base to new layer paste ?
Post by: dussla on May 05, 2012, 01:37:12 PM
really thank you ~
really really ~
Title: Re: copy base to new layer paste ?
Post by: fixo on May 05, 2012, 02:07:08 PM
Happy to help
Cheers :)

~'J'~