Copy/Paste block into drawing and redefine?

Copy/Paste block into drawing and redefine?

BunnyHug
Participant Participant
12,513 Views
19 Replies
Message 1 of 20

Copy/Paste block into drawing and redefine?

BunnyHug
Participant
Participant

Hello Everyone,

 

Was there not a way to copy/paste an updated version of an existing block into a drawing and give you the ability to redefine it? I believe this function was in AutoCAD 2011 or 2012. Is there a system variable that controls this function?

 

Ex. Copy/paste updated title block into an old drawing. CAD then prompted you to insert block or insert block and redefine.

 

Note: I am aware of -insert & design center. I am currently using AutoCAD 2015.

 

Thank you in advance.

 

0 Likes
Accepted solutions (2)
12,514 Views
19 Replies
Replies (19)
Message 2 of 20

imadHabash
Mentor
Mentor

Hi and Welcome to AutoDesk Forum,

 

i suggest to read this LINK that could help you.

 

Regards,

Imad Habash

EESignature

Message 3 of 20

BunnyHug
Participant
Participant

Thanks for the reply but I mentioned in my post I was aware of -insert & design center. I am wanting to find a option to copy/paste blocks from one drawing to the other and redefining.

0 Likes
Message 4 of 20

imadHabash
Mentor
Mentor

HI,

 

Q:are your blocks an attribute blocks?

Imad Habash

EESignature

0 Likes
Message 5 of 20

BunnyHug
Participant
Participant

Yes, this would include blocks with attributes and non attribute blocks.

0 Likes
Message 6 of 20

Anonymous
Not applicable

Through 2015 copy paste will not redefine a block, i will use the block definition already in the file.  Can't speak for later releases.

 

 

That said you can rename the bad block in the target file and copy paste from a source file to create a new block in the target file, then simply replace the existing blocks with the new definition with the BLOCKREPLACE express tool..

 

 

0 Likes
Message 7 of 20

BunnyHug
Participant
Participant

Thanks for the reply Randall. I am working with thousands of drawing with the same block. Changing the definition in every single drawing inst an option. I have written a script to redefine blocks using -insert command. However, I do not want to give the script to contractors. In previous versions of AutoCAD it did allowed you to redefine blocks with copy/paste. Did CAD 100% scrap this function or is there another way of turning it back on? AutoLISP anyone?

 

I am aware of many work arounds. I a, specifically looking for copy/paste.

0 Likes
Message 8 of 20

Anonymous
Not applicable

I've been using AutoCAD since before copy-paste was an option, it's never redefined a block on any versions I've used.

 

Message 9 of 20

Kent1Cooper
Consultant
Consultant
Accepted solution

@BunnyHug wrote:

.... In previous versions of AutoCAD it did allowed you to redefine blocks with copy/paste. Did CAD 100% scrap this function or is there another way of turning it back on? AutoLISP anyone?

....


I have to agree with @Anonymous -- I don't think it's ever worked that way in copy/paste fashion.

 

My suggestion would be to WBLOCK the Block definition out of the drawing in which it's defined as you want it, to a drawing file with the same name as the Block, in a Support File Search Path location.  Then in other drawings, do this:

 

(command "_.insert" "YourBlockName=") (command)

 

The = sign will make it look for an external drawing with the same name as the Block.  In Acad2016 that I have here, if done manually, at the Command: prompt with the hyphen-prefixed -Insert command, it asks whether you want to redefine it, but when done in an AutoLisp (command) function like that, it just redefines it without asking [it notifies you that it's been redefined].  If that's not the case in all versions, you may need to supply the answer "_yes" to that prompt, or possibly a high-enough EXPERT System Variable setting will eliminate the question.  Once it gets to that point, the new definition is loaded in, and you can cancel the command [the (command) function with no arguments] without going through with finishing an Insertion of it.

 

That could be automated and applied across a whole collection of drawings with something like Scriptpro.

Kent Cooper, AIA
Message 10 of 20

Anonymous
Not applicable

Kent1Cooper wrote:
I have to agree with @rculp -- 

 


 

 

I'll bet that hurt 🙂

 

 

 

.

 

 

 

0 Likes
Message 11 of 20

SeeMSixty7
Advisor
Advisor

Why wouldn't you want to give the script to contractors? Actual script file or LSP file?

0 Likes
Message 12 of 20

Anonymous
Not applicable
Accepted solution

 

(command "-insert" "blockname=c:/subdir1/subdir2/subdir3/newblockname"(command))(command "attsync" "n" "blockname")

 

 

blockname = the block in the drawing you want to update

c:/subdir1/subdir2/subdir3/newblockname = the location and name of the new block you wish to use instead

 

The lisp line above will update blockname to match newblockname in folder c:/subdir1/subdir2/subdir3/ and the ATTSYNC any attributes.

 

Edit the line for your block names and locations.  Then if you're real adventurous, add the line to your acaddoc.lsp and the block will be updated every time you open the file.

 

Message 13 of 20

jmctigue
Explorer
Explorer

It used to allow you to do it from insert, but that seems to be written out of it. Why they remove functionality from AutoCad is beyond me.

Message 14 of 20

RobDraw
Mentor
Mentor

@jmctigue wrote:

It used to allow you to do it from insert, but that seems to be written out of it. Why they remove functionality from AutoCad is beyond me.


It seems that you are off topic. This thread is about redefining with paste from clipboard, not insert.


Rob

Drafting is a breeze and Revit doesn't always work the way you think it should.
Message 15 of 20

gmattingly.pls
Explorer
Explorer

Posting for the future:

 

The WBLOCK function sounds nice, but that method does not scale efficiently for more than a few blocks. I found this other thread that offers a more elegant solution, which is to put all the blocks you want to redefine only a tool palette (in my case I just used "Recent Blocks" since I was editing my blocks anyway) and insert the new blocks into the old drawing by clicking on their thumbnails. That brings up the old "would you like to redefine this block?" prompt that OP was asking for. While not as fast as a bulk copy/paste that older versions would do, for many blocks this is much less work that write-blocking and then re-inserting every single definition you want to change.

 

And while this might seem like an edge case, I do this almost daily when I'm pulling block definitions from our current template, many of which are also used for our point markers, into drawings created years ago with an older version of the template. Prob saves me tens of hours of mundane work over the course of a year.

0 Likes
Message 16 of 20

TomBeauford
Advisor
Advisor

The newer -INSERTCONTENT (Command) allows you to do what you can no longer do with the INSERT (Command).

64bit AutoCAD Map & Civil 3D 2023
Architecture Engineering & Construction Collection
2023
Windows 10 Dell i7-12850HX 2.1 Ghz 12GB NVIDIA RTX A3000 12GB Graphics Adapter
0 Likes
Message 17 of 20

cadffm
Consultant
Consultant

Happy new year,

Bunny, JM and to you: There is nothing what "removed" 

Not for clipboard and not for insert.

 

Insert command is not more limited than earlier, insertcontent is a good additional feature - 

to insert blocks from another file.

But does it offer a redefine option for insert internal blocks? (Sorry, I am away from Acad)

 

 

@gmattingly.pls 

WBlock&-Insert, you will find "wblockall" and "insertall" tools, 3 or 50 blocks doesn't matter.

You will find more smart tools, but nothing ootb.

 

 

 

 

 

Sebastian

0 Likes
Message 18 of 20

TomBeauford
Advisor
Advisor

INSERT (Command) for a few versions now displays the Blocks palette, which you can use to insert blocks and drawings into the current drawing. It's no longer the command we relied on for decades.

 

While the -INSERT (Command) does allow updating as before it cannot insert a block from another drawing like the 

-INSERTCONTENT (Command)or the ADCENTER (Command).

 

With the -INSERTCONTENT (Command) you can choose to redefine the block:

You can control block insertion behavior using the following methods:

  • Inserting exploded blocks: Preceding the name of the block with an asterisk (*) explodes the block and inserts the individual parts of it. The block definition is not added to the drawing.
  • Updating a block path: If you enter a block name without a path name, INSERT searches the current drawing data for an existing block definition by that name. You can replace an existing block definition with an external file by entering block name=file name.
  • Updating a Block Definition: If you make changes to a block file that is inserted in your drawing and you want to change the existing block definition without creating a new block insertion, enter the following at the Insertion Point prompt (following the Block Name prompt):

    block name=

    If you enter = after the block name, the following prompt is displayed:

Block "current" already exists. Redefine it? Specify Yes or No.

If you choose to redefine the block, the existing block definition is replaced with the new block definition. The drawing is regenerated, and the new definition is applied to all existing insertions of the block definition. Press Esc when prompted for the insertion point if you do not want to insert a new block into the drawing.

 
64bit AutoCAD Map & Civil 3D 2023
Architecture Engineering & Construction Collection
2023
Windows 10 Dell i7-12850HX 2.1 Ghz 12GB NVIDIA RTX A3000 12GB Graphics Adapter
Message 19 of 20

cadffm
Consultant
Consultant

Hi Tom,

 

that's all right, but:

INSERT: You already have the same functions as before (plus: you can insert blocks from another file. Thats the added Insertcontent functionallity).

So, nothing removed, just added.

 

INSERTCONTENT:

Sorry, I wasn't clear with my question - or I was not specific enough:

But does it offer a redefine option for insert internal blocks by using it in a script? 

I am back at Acad in few minutes, so I can answer my question on my own.

 

 

Sebastian

0 Likes
Message 20 of 20

cadffm
Consultant
Consultant

@cadffm  schrieb:

Hi Tom,

....

INSERTCONTENT:

Sorry, I wasn't clear with my question - or I was not specific enough:

But does it offer a redefine option for insert internal blocks by using it in a script? 

I am back at Acad in few minutes, so I can answer my question on my own.


A:

I was sure there was a problem with Blockredefinemode=2  . Whatever: In the last tested version - it works (YES!!).

Remembered wrong, or it was a bug in a specific version, I don't know, but I am happy that is works today.

(thank you, because of your post I tested it again, with success, Kudos for you)

 

Perhaps I remembered wrong because you cant skip the redefine question for inserting blocks from another file

and you have to cancel the insert process (by lisp) or without Lisp - you have to place a blockreference and delete them then.

 

The "=" hint in documentation is still for inserting dwg files as block only (not for inserting blocks from another file),

or I still not found the right syntax.

 

 

Sebastian

0 Likes