Autodesk Community Tips - AutoCAD Products
Autodesk Community Tips are bite-sized fixes, shortcuts, advice, and how-to tips shared by Community members.

Paste As Block - One And Done!

Contributed by:

Tips & Tricks Banner White - V1.0_Paste As Block.png

 

Moving an entity (or what looks like one entity) in AutoCAD can sometimes be a challenge. I frequently get data from outside vendors websites. In the illustration below, both entities look the same. As I have noted, however, there are many more items in the one on the right side. This is how I received the data from the vendor. Usually the multiple items are a result of exporting a 3D item to a 2D drawing.

 

PB_1.jpg
 
I have previously selected the item(s) on the right with a selection window (left to right) and copied them to the clipboard, being sure to capture all the individual entities.
 
PB_0.jpg
 
When inserting the clipboard contents, I will choose to "paste as block". This will bring all 2098 individual entities into my drawing as a single item. I have chosen to "move" the item that I just inserted into my drawing as a block from the clipboard.
 
PB_2.jpg
 
I can now select any point on the blocked object as a handle to proceed. Note how every detail of the entity is included when I select it to move. No leftover lines here! If, on the other hand, I had just inserted the clipboard contents without selecting "paste as block", I could see something like the example below.
 
PB_4.jpg

An unexpected result, with a bit of clean-up to do! The selection window did not capture everything. Some will say that "grouping" the items does the same thing. Yes, that will produce similar results, however, if I want to copy the blocked data to another drawing, I can simply copy the blocked item to the clipboard, and paste normally into another drawing. I can also wblock out the single item to my computer for future use.

Comments

Nice tip @caddude1 i use that all the time 😃

Groups are defined in the drawing they are created in and will no longer be grouped when inserted into another drawing.

You can add this Paste as Group lisp macro to your Paste drop-down to paste objects from the clipboard as a new group into a drawing.

 

^C^C_pasteblock;\(setq LstBlk(vla-get-Name (vlax-ename->vla-object (entlast))));_explode;_last;_-group;_create;*;;_previous;;(command "-purge" "B" LstBlk "N")
(setq LstBlk nil)

 

 It actually Pastes the objects as a block, explodes the block placing the objects into a group then purging the block leaving only the group. I use it all the time as toggling group selection On/Off with Ctrl+H makes modifying objects much easier than using the Block Editor.

Note: as (vl-load-com) must be loaded for Visual Lisp commands to load most who use it add it as the first line of acaddoc.lsp or include it in a mnl or other file that is loaded whenever a drawing is opened.