TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: ribarm on June 24, 2019, 08:37:14 AM

Title: copy+rename block definition
Post by: ribarm on June 24, 2019, 08:37:14 AM
Hi all,

Maybe I missed somewhere this topic as I believe it was certainly asked... I want to copy+rename block definition and I would like it to be done through picking and copying definition reference entity... So basically I want to copy block like with command COPY, but result would be not another reference of the same definition, but another reference of renamed definition... I want both definitions in DWG as result and only difference between them are their names... Bonus request is if it's possible that this task could be applicable and to dynamic blocks as well... All nesting structures of child entities and blocks should be preserved...

Thanks for any input or link I am missing...
Regards, M.R.
Title: Re: copy+rename block definition
Post by: ribarm on June 24, 2019, 08:58:09 AM
I forgot to say... All attached info of source entity and definition (XDATA, LDATA, Hyperlinks, ... ) should be copied into destination entity and definition without any difference - they must be exactly the same...
Title: Re: copy+rename block definition
Post by: HasanCAD on June 24, 2019, 09:00:11 AM
I think Lee has such as a block
http://www.lee-mac.com/copyblock.html
Title: Re: copy+rename block definition
Post by: ribarm on June 24, 2019, 09:37:10 AM
I think Lee has such as a block
http://www.lee-mac.com/copyblock.html

Thanks for the link... This is far more elegant than copybase block in new DWG, rename there, and copybase renamed block back (pasteclip) in master working DWG...

Just haven't checked if all linked data is preserved... Maybe if Lee finds some time can answer on this statement...
Title: Re: copy+rename block definition
Post by: ribarm on June 24, 2019, 10:04:54 AM
Just haven't checked if all linked data is preserved...

Just checked, both methods are fine in preseving linked data... Perfect, thanks Lee and Hasan...
Title: Re: copy+rename block definition
Post by: HasanCAD on June 24, 2019, 10:20:02 AM
Just haven't checked if all linked data is preserved...

Just checked, both methods are fine in preseving linked data... Perfect, thanks Lee and Hasan...

All Appreciation to LEE I am just Links index.
Title: Re: copy+rename block definition
Post by: Lee Mac on June 24, 2019, 12:42:54 PM
Just haven't checked if all linked data is preserved...

Just checked, both methods are fine in preseving linked data... Perfect, thanks Lee and Hasan...

All Appreciation to LEE I am just Links index.

Thanks both.  :-)