Copy or Rename Block Reference

Copy or Rename Block Reference

Philip-John
Advocate Advocate
1,966 Views
6 Replies
Message 1 of 7

Copy or Rename Block Reference

Philip-John
Advocate
Advocate

I have the following lisp from Lee Mac. It's working good.

http://www.lee-mac.com/copyblock.html
Currently running "CB" command it creates a copy of block and paste in same place and ask for new name.
But I need, somebody can modify, it to copy and paste in another location (where I choose) then ask for new name.

Regards,

Philip John

0 Likes
Accepted solutions (2)
1,967 Views
6 Replies
Replies (6)
Message 2 of 7

dbhunia
Advisor
Advisor

I think the attached LISP (Modified) may fulfill your requirement.......

 

 


Debashis Bhunia
Co-Founder of Geometrifying Trigonometry(C)
________________________________________________
Walking is the First step of Running, Technique comes Next....
0 Likes
Message 3 of 7

Philip-John
Advocate
Advocate

Thanks..

It's ok somewhat...

It is appreciable if you could make it as I requested (paste then ask for new name)

0 Likes
Message 4 of 7

Kent1Cooper
Consultant
Consultant
Accepted solution

@Philip-John wrote:

.... if you could make it as I requested (paste then ask for new name)



Here's a version of a duplicate-Block routine of mine, edited to work as you describe.  [The original replaced  the selected Block in place  by one with the new name -- this has you Copy it, using its insertion point as the Copy-displacement base point, and then does the same with the copied one in the new location.]

 

It has some nice features [I think] -- it offers you the current name with a hyphenated-number suffix, to edit as you like, so it it's a long name and you want to change only a little of it, you don't need to type in the whole thing.  If the Block name with the hyphenated-number suffix is already used, it counts up from there until it finds a not-yet-used number.  And it deals appropriately with other-than-1 scale factors and other-than-zero rotation.  See further comments at the top of the file.

Kent Cooper, AIA
Message 5 of 7

dbhunia
Advisor
Advisor
Accepted solution

@Philip-John wrote:

Thanks..

It's ok somewhat...

It is appreciable if you could make it as I requested (paste then ask for new name)


 

In that case you have to copy the block with new name and then rename it ....... that will solve your requirement....... 

 

Then check the attached LISP .......

 

 

 

 


Debashis Bhunia
Co-Founder of Geometrifying Trigonometry(C)
________________________________________________
Walking is the First step of Running, Technique comes Next....
Message 6 of 7

Philip-John
Advocate
Advocate

Thanks Debashis Bhunia

0 Likes
Message 7 of 7

Philip-John
Advocate
Advocate

Thanks Kent Cooper

0 Likes