How to remove a block from a drawing autocad. Removing a block in AutoCAD - simple solutions for effective work

Working with blocks is one of the key advantages of using AutoCAD, which greatly simplifies the construction of projects. But after preparing the drawing, the question becomes reasonable, how to remove the block in AutoCAD if it is not used in the project.

Technique for removing blocks in AutoCAD.

After all, unnecessary definitions seriously affect the overall file size. Therefore, it is logical to want to optimize the project, getting rid of unnecessary ones. Our instructions will allow you to achieve this effect in a matter of minutes.

Why blocks are needed in AutoCAD - the main advantages of work

They can rightfully be considered the crown of drawing automation in AutoCAD. In fact, they are a single object that is created based on primitives.


How to remove unused blocks in AutoCAD - a simple procedure

To delete an entry in the drawing (link), the standard method is also quite suitable. To do this, select the necessary block and press Delete. Or you can use the "Erase" command. But in this case, we need to take into account one detail dangerous for us - the definition itself will still be saved in the file. Therefore, it will continue to be on the list, taking up additional space.

It would seem logical to assume that the AutoCAD Block Editor can help us in this case. But, having experimented a lot with this tool, we were able to absolutely make sure that it is not capable of solving the problem.

But this is not the time to get upset - there are other more effective ways. In particular, you can use the CLEAR command to remove unnecessary definitions. Although there is a catch here - to be sure that this command is actually executed correctly, you need to make sure that there are no block occurrences in the graphics space. Therefore, they will be removed in several stages - first of all, we get rid of the blocks in our drawing. Next, go to the "Applications" menu, select "Utilities" here, then click "Clear".

Although, if desired, you can use the command line, specifying here for a similar command: AutoCAD Utilities - Clear operations. The opened dialog box "Clean up drawing" allows the user to see in more detail the tree of all named objects, which we can proceed to delete. To clear the entire drawing from unused blocks at once, use the "BLOCKS" section.

If it is necessary to delete only individual objects, then with the left mouse button double-click on the "Blocks" element. A general list of blocks will appear, from which it remains to select the ones required for deletion.

We also remind you that some of them may not initially appear in such a list. To see absolutely everything, use the "View items that cannot be deleted" option.

After deleting the required definitions, an updated list of definitions appears in your drawing.

The procedure is quite simple and takes a few minutes. Treat file optimization responsibly - by automating and simplifying the solution of the tasks, without losing the necessary data.

Working in AutoCAD very often it becomes necessary to use repeating elements of the drawing, consisting of separate primitives, text labels and even tables. To optimize this process, so-called blocks are used.

But, when the block is already formed, sometimes it becomes necessary to perform various manipulations with them. That's why, block editing in AutoCAD e, a topic that should be given special attention. This article describes how to delete unnecessary blocks so that there is no confusion, and the file itself weighs less.

How to delete a block in AutoCAD

Very often, after creating a drawing, it becomes necessary to delete unused blocks. This not only reduces file size, but also avoids confusion. Of course, the very occurrence of the block (link) is deleted by erasure. You can also select a block in the drawing and press Delete. But at the same time, the block definition itself remains in the file, and, accordingly, in the list of blocks. Unfortunately, AutoCAD block editor it won't help.

Using the "CLEAR" command you can get rid of unnecessary blocks. For the command to execute correctly, check that there are no block occurrences in the graphics space.

So, having previously removed the blocks from the drawing, go to the application menu (the letter "A" in the upper left corner), select "Utilities" → "Clear". An alternative option is to use the command line.

The Clean Up Drawing dialog box displays a tree of all named objects that you can delete.

To clear the entire drawing of unused blocks, select BLOCKS. You can include nested blocks in the list by enabling the "Remove nested elements" option.

If you want to delete only some unused blocks, LMB double-click on the "BLOCKS" element. A list of blocks will open. Select the items you want to remove.

It is possible that some blocks may be missing from the list. In this case, check the box next to "View items that cannot be deleted."

When removing blocks from the list, confirm your action. This option can be suppressed by turning off the "Delete items with confirmation" prompt.

Click Remove. An updated list of available block definitions in the drawing appears.

Now you know how to AutoCAD remove block... I want to remind you that Loki AutoCAD download can be on this site. Create your own collection to make the work in the program flexible, convenient and fast!

Good day!

Quite often, users ask the question - what can be done with the file Dwg that came from another user? How can I clean it up and optimize it to avoid problems when using it? Quite a few have already been written and rewritten on this topic, I bring my experience.



Indeed, even in a "decent" file, created according to all the rules and recommendations of the developer and in accordance with the experience of other sophisticated users, there is often all sorts of garbage, unnecessary and unused elements. The appearance of such unnecessary objects is inevitable, since when working with a file, you have to redraw the geometry several times, create temporary objects to work out design solutions, and much more. Naturally, you can forget to delete something. Also, if the file was created in "vertical" AutoCAD or in a third-party application, then it may contain proxy objects and unnecessary data about these applications.

In the article, I tried to describe the maximum possible number of actions that can be performed with a DWG file, in each case you need to look at which of them to apply.


1. Delete unused geometry

Description of the problem:

Remove all intermediate sketches, elaboration elements, etc. from the drawing. Often users forget to remove their drafts from the finished files, get rid of them. Also, delete geometry that might be mistakenly away from the main body of the drawing.

Solution:

Unfreeze all layers, run the command show all(double click on the mouse wheel). If there is distant geometry in the drawing, then you can immediately see it. Use Select All (Ctrl + A) to select all objects in the drawing. After you select all objects, hold down the key Shift and select those objects that you need. Anything else not needed, delete. Be careful! Command Choose all selects objects that lie on disabled layers, so you will delete all objects that you do not see in the current drawing state, but that you may need.

2. Find and remove all invisible objects

Description of the problem:

Blank invisible objects such as points, blank lines, hidden blank block attributes, invisible faces of 3D objects, groups and masks can appear in drawings. They take up disk space and take time to process them - safely delete them!

Solution:

  • To find hidden points, change their appearance with the command DIALTTOCH (_DDPTYPE), they will become visible

  • To remove empty lines, assign to the variable QTEXTMODE value 1. In this case, all lines will be displayed as an empty frame, even empty ones. Don't forget to set the variable back to 0.
  • To display hidden attributes, enter the command ATTECR (_ATTDISP) and select the Enable option. In this case, all attributes, even hidden ones, will be displayed on the screen. Delete unnecessary ones. Be careful! Hidden attributes can store the information you need.
  • To display hidden edges and faces of 3D objects, assign SPLFRAME value 1. Remove unnecessary elements such as control polygons for spirals, invisible edges of faces and meshes, etc.
  • Start the group manager with the command GROUP (_GROUP) or CLASSICGROUP and remove unnecessary groups
  • To search for invisible masking objects, turn on their frames with the command TFRAMES from Express Tools or set the value of the variable WIPEOUTFRAME= 1 and delete unnecessary ones.

3. Remove repeating geometry, overlapping lines, arcs and polylines

Description of the problem:

Overlapping lines, repeating objects, and other unnecessary objects are common as you sketch and modify the drawing. They are not visible visually, but in reality there are many of them in every drawing. Clean the drawing from unnecessary graphic debris.

Solution:

Use the command PURGE (_OVERKILL) to remove duplicate or overlapping lines, arcs and polylines. In addition, the command combines partially overlapping or adjacent elements.



4. Remove unused layers

Description of the problem:

Drawings often contain layers that have nothing on them. Delete them. If the layer is not deleted, then there is something on it, or it is frozen in some kind of viewport. Check the state of the layer in all viewports, very often it is impossible to delete an empty layer precisely because it is frozen in the viewport.

Solution:

  • Use the command LAYOBED (_LAYMRG) to merge layers. After merging, the empty layer is removed from the drawing
  • To remove a layer containing objects, use the command LAYDEL (_LAYDEL).
  • In order to understand whether layers are used, set the variable SHOWLAYERUSAGE value 1. In this case, icons will be displayed in the list of layers indicating whether layers are being used. Important! Remember to turn off the display as it slows down the system.

5. Remove unused layer filters

Description of the problem:

Remove unused layer filters. Even if you previously deleted unnecessary layers, the filters in which they appeared will remain.

Solution:

Run the command FILTERS (_FILTERS) and remove unnecessary filters.


6. Remove unused and unnecessary design styles

Description of the problem:

Almost every drawing contains unused text, dimension, table, multileader, multiline, section, detail, and plot styles. Get rid of them. Be careful, you might delete a style that is a corporate template customization and may be useful to you in the future!

Solution:

To remove unused styles use the command PURGE (_PURGE)



7. Remove unused blocks, linetypes, shapes, etc.

Solution:

To remove unused objects also use the command PURGE (_PURGE)... As of AutoCAD 2015, this command also removes groups, empty text strings, and data from DGN files (from Bentley's Microstation system). If your AutoCAD is older than 2015, use the AutoCAD DGN Hotfix for 2013 and 2014, or third-party utilities to remove garbage from DGN files.

8. Check the file for errors

Description of the problem:

Check the drawing database for errors

Solution:

To check, use the command CHECK (_AUDIT)... If errors are found in the file, then use the drawing recovery command RECOVER (_RECOVER) to fix them.

9. Delete the history of the creation of 3D solids

Description of the problem:

When building three-dimensional solids in AutoCAD, it is possible to save the history of their construction (system variable SOLIDHIST). However, this data greatly "burdens" the drawing and slows down the work. Delete history if you do not plan to edit bodies.

Solution:

This can be done using the command GRPRED (_BREP), it allows you to remove the story from 3D and compound bodies, and unassociative surfaces.

10. Delete the data of registered applications

Description of the problem:

If you received a file created in any "vertical" AutoCAD, for example, AutoCAD Mechanical, then it may contain information about this program. Delete this data, it takes up space and slows down the file.

Solution:

To delete data on registered applications, enter the command -PURGE (-_PURGE), select an option REGISTER (_REGAPPS) and press Enter... If the command finds data on registered applications, then it will issue an error message for deleting them.

11. Remove geometric and dimensional constraints

Description of the problem:

When building parametric sketches and drawings, users create geometric and dimensional constraints. If you do not need parameterization in this drawing, then you can remove these constraints.

Solution:

Use the command REMOVER (_DELCONSTRAIN), it allows you to remove all geometric and dimensional constraints from a set of objects.

12. Remove unused proxy primitives and proxy objects

Description of the problem:

If the drawing was created using third-party applications for AutoCAD, or in "vertical" AutoCAD, then it will contain many proxy primitives, some of which are hidden. Proxy primitives are used in AutoCAD and other applications in place of third-party objects created with ObjectARX if the latter is not available. Later, when the application becomes available, proxy primitives and proxy objects are replaced with third-party objects.

Solution:

Assign to variable PROXYSHOW value 2, then all proxy primitives will be displayed as a bounding box. Delete unnecessary ones. The deletion process is described in more detail in the document by Alexei Kulik in paragraph 5, I will not repeat it.

13. Delete unused scales

Description of the problem:

When working with annotative objects, the user creates a lot of annotation scales, some of which eventually turn out to be unused. Delete unnecessary ones.

Solution:

Use the command -SCALELISTEDIT (-_SCALELISTEDIT), select an option Delete and enter *. Any unused scales will be removed.

14. Delete location data

Description of the problem:

In modern versions of AutoCAD, it became possible to include geolocation data in a drawing so that it could be tied to a specific place on the map. Delete location data if you do not plan to use it.

Solution:

Use the command UDALGEO (_GEOREMOVE) to remove all geographic location information from the drawing file.


15. Don't mindlessly dismember blocks.

Description of the problem:

I often meet users who, at the first opportunity, explode blocks in other people's drawings, motivating this by the fact that no one knows what is in these blocks and how they are made, and the dismembered geometry can be corrected easily and quickly, without fear of spoiling the entire drawing when changing block. On the one hand, everything is correct, because when you change a block, you can choose the wrong base point, for example, in this case all occurrences of the block will change and the drawing will become unusable. On the other hand, blocks save memory significantly - if there are 10 primitives in one block and this block is inserted 100 times, then you will work with 110 primitives. If all these blocks are exploded, then you will have to work with 1000 primitives, each of which has a bunch of parameters. Therefore, do not rush to thoughtlessly dismember all the blocks.

Solution:

If you really need to make changes to the block, copy it into a new file, experiment with it, and then make changes to the original file.

A separate story is dynamic blocks. You need to be doubly careful with them, since their dismemberment is almost guaranteed to lead to file corruption.

16. Flatten the drawing

Description of the problem:

Often a drawing contains three-dimensional objects. If the user has a top view turned on, then he simply will not see these objects and will snap to 3D objects when drawing. As a result, you will not get a drawing, but a set of spatial objects, which have different coordinates along the Z axis. To avoid this situation, you need to make a flat drawing. Such drawings can "exit" from programs that work with solid objects, for example, floor plans from AutoCAD Architecture, topographic results from AutoCAD Civil 3D. Checking a drawing for 3D objects is easy - rotate it using a 3D orbit or view cube.



Solution:

Use the command FLATTEN from the Express Tools package. When using the tool FLATTEN creates a 2D representation of the selected objects and projects them onto the current view plane. The result of the work is 2D-objects, where possible, retaining the original layers, line types, colors and types of objects. This will allow you to avoid creating a drawing with anchoring of primitives to 3D objects.

Alternatively, you can select all geometric objects and use the Properties window to set the Z coordinate to 0.


Conclusion

All of the above methods for cleaning and preparing a file can be useful to users in their daily activities when it is necessary to clean up DWG files. In reality, of course, there is no need to use all these methods at the same time, it is enough to apply several.

If you want to automatically clean the file, then use the program from Alexey Kulik aka kpblc. Read more about it in his blog at the link.


UPD: added the deletion of geo-location data to the post and corrected the item on the removal of unused geometry. Thanks to colleagues Alexey Kulik, Evgeny Elpanov, Alexander Rivilis and Neibosha Novkovich for their help and tips. Thanks friends!

Blocks in AutoCAD are created manually by users when a certain number of elements are selected to enter, or they are added independently when drawing complex 2D and 3D objects. This allows you to apply the same settings to different elements, link them and edit them together. However, there are situations when a block needs to be deleted. This can be done in completely different ways, and at the same time it is worth taking time for the information remaining in the project, which remains invisible.

Today we want to devote our attention exclusively to the analysis of methods for deleting blocks in the software under consideration, starting with the simplest and ending with the complex, in which absolutely all occurrences are erased. The fact is that the block initially contains the code that the user does not see. It remains in the memory of the drawing even after all objects are deleted, so sometimes there is a need for a complete cleaning. However, let's sort things out in order, starting with banal and understandable actions.

Method 1: using a hotkey

Many users are aware of the presence of a key on the keyboard called DEL or Delete... By default, it contains a function that allows you to delete files, objects and any other information in the operating system and various applications. In AutoCAD, this key serves exactly the same role. You just need to select a block with the left mouse button so that it lights up in blue, and then press the corresponding key. The action will be performed automatically, you do not need to confirm it.

However, it should be borne in mind that this method is not able to remove all tails and occurrences. Only a special utility will cope with this, which we will talk about at the end of this material.

Method 2: context menu

As you know, in AutoCAD you can interact with blocks and other elements in every possible way. A lot of useful tools are called up through the context menu. This also includes the tool "Erase"... You can use it like this:


If suddenly you accidentally deleted the wrong block, do not worry, the undo of the last actions is done with a standard key combination Ctrl + Z... This will return the object to the project with all its settings.

Method 3: Clearing Unused Blocks

The option with clearing unused blocks will work only if the objects do not contain the information that is in the drawing, or all incoming elements have already been deleted earlier. This method will allow you to simply get rid of unnecessary parts of the drawing:


Method 4: Utility "Clean"

Utility "Clear" useful in cases where you have already used Method 1 or Method 2... They demonstrate only the removal of block components, but the definitions remain. It is this tool that will help get rid of them.


If you mark with a marker the item responsible for displaying elements that cannot be deleted now, you will be able to view all blocks with the remaining occurrences.

Additionally, for novice users, we recommend studying special training material on the topic of interacting with AutoCAD. In it you will find a lot of interesting information that will help you quickly get used to this software and start using it fully.

Above, you were familiar with the possible methods for deleting blocks in AutoCAD. As you can see, they involve performing completely different actions and will be appropriate in certain situations. Therefore, read all of them so that you always know which option to use in which situation.

Working with blocks in AutoCAD gives certain advantages (read the article "Features of using blocks in AutoCAD"). However, after creating a drawing, very often there are "extra" blocks that are not used in the project. And this, in turn, significantly affects the file size. Therefore, in this article, we will consider how to delete unnecessary blocks so that there is no confusion, and the file itself weighs less.

Rice. 1. Blocks in AutoCAD are not all used in the project.

How to remove a block in AutoCAD?

A block entry in the drawing (i.e. a link) is deleted in the standard way: you can select the block and press Delete, or you can use the DELETE command. But with such an action, the block definition itself remains in the file, and, accordingly, in the list of blocks.

Unfortunately, the AutoCAD block editor will not help with this.

In order to get rid of unnecessary blocks in AutoCAD, use the "CLEAR" command. To run this command correctly, make sure there are no block occurrences in graphics.

So, removal of blocks in AutoCAD takes place in several stages: first you need to first remove the blocks from the drawing, then go to the application menu (the letter "A" in the upper left corner), select "Utilities" → "Clear". An alternative option is to use the command line.

Rice. 2. Removing AutoCAD blocks - the "Clear" command.

The Clean Up Drawing dialog box displays a tree of all named objects that you can delete.

Rice. 3. Dialog box AutoCAD "Clean up drawing".

To clear the entire drawing of unused blocks, select the BLOCKS section.

By connecting the option "Delete nested elements", you can include nested blocks in the list for deletion.

If you need to delete only some objects, then double-click LMB on the "BLOCKS" element. A list of blocks will open, in which you should select the elements to delete. (see fig. 4).

Rice. 4. List of AutoCAD blocks that can be removed.

It is possible that some blocks may be missing from the list. In this case, check the box next to "View items that cannot be deleted."

Rice. 5. View all existing blocks in the AutoCAD file.

When removing blocks from the list, confirm your action. This option can be suppressed by disabling the "Delete items with confirmation" prompt (see Fig. 6).

Rice. 6. Removing the block in AutoCAD.

Click Remove. An updated list of available block definitions in the drawing appears when you execute the Insert command (see Figure 7).