Re: Remove unwanted layers in AutoCAD LT Hi @dipship381, There are several ways to get rid of layers that you don't want. One of the old school ways is to freeze all the other layers, and then erase all the entities left on the screen. You can do with LT: the reason the layers do not purge is that they are referenced by blocks/attributes on other layers. If you have access to Full AutoCAD, and Express Tools, LAYMRG or LAYDEL commands do a good job of eliminating the unwanted layers (by merging. You can specify lots of settings to control the process. For example, you can check the Ignore LAYERS check box to delete overlapping lines, even if they are on different layers. The Numberic Fuzz text box determines how exact two objects must be to be considered duplicates. The default, 0.000001, deletes almost exact objects.
Similar Messages:
Narrator So we're staying in our 04 officereception area drawing.And what we're going to look at now is deletingand purging out any unwanted annotation styles.So this includes dimension styles, text styles,multileader styles, and so on.Now the quickest way to that is to go to purge,like so, type purge, press enter and we've gotdimension styles in there that we don't. Open a drawing that has unpurgeable items (bunch of.A1nnn blocks) Say “A1.DWG”. Turn On, Unlock, and Thaw all your layers. Type WBLOCK and choose the “Objects” option. Select everything in your drawing (crossing, window, etc.).
ADVERTISEMENTAutoCAD VB :: Delete Blocks With Specific Names In Multi Layout Drawing
Apr 25, 2011In autocad 2011 .. I am looking for some sample code to delete all blocks with specific names in a multi layout drawing. There may be multiple blocks with the same name.
This is what I have so far .. this code collects the objects and loops through the layouts and the blocks .. if it finds the text 'REVBLK' in the block name .. I want it to delete the block .. it does delete some of them but not all of the blocks ..
Dim E1 As Object
Dim ATS As Variant
Dim EA As AcadAttributeReference
Dim objLayouts As AcadLayouts
Dim LayerNextNo As Integer
Set objLayouts = ThisDrawing.Layouts
LayerNextNo = ThisDrawing.ActiveLayout.TabOrder
[code]..
AutoCAD .NET :: Select Model Space Drawing And Assign It To Layout Viewport
Jun 14, 2013I have three drawings in modelspace and three viewports in one layout (paperspace), I would like to select each modelspace drawing and assign it to each layout viewport.I'm using Visual Studio 2012, .NET Framework 3.5 and Csharp.
AutoCAD Visual LISP / AutoLISP :: Select All Viewports In Drawing / Get Name Of Layout
Sep 29, 2013I need to select all the viewports in the drawing and to make some changes with them, I'm planning to select them all with ssget command. If I do that I will have one viewport for the paperspace itself in every layout. One of my question is, how to know which viewport is the paperspace itself?
Second question is, how to get the name of layout in which one is the viewport? It is important to me that the lisp is really fast, so I'm planning to do the most of stuffs with vla commands.
AutoCad 2D :: How To Delete Unwanted Layers
Jul 25, 2012I have imported a dxf file from our Trimble handheld unit. The dxf has layers built into it that come straight from the trimble software. (ei, FENCE, TANK, WELL HEAD, FIELDLINE) I have custom built layers and linetypes for my .dwt file in Cad so I dont need the layers that followed the dxf file.
For some reason I am unable to delete those layers, I get a warning box saying:
The following layers cannot be deleted:
. layers 0 and Defpoints
. The current Layer.
. Layers containing objects.
. Xref-dependant layers
I am not on the current layer, I am pretty positive there is no objects on the layers I want to delete ( i have deleted my gps points and blocks that were imported)
I am not using any xref dwg's
AutoCAD Inventor :: How To Delete Unwanted Geometry
Jan 28, 2013I have generated a model but want to get rid of unwanted geometry to clean it up, how do I delete unwanted geometry?
AutoCAD Inventor :: Delete Unwanted Styles?
May 31, 2013In creating our drawing template, I collected alot of unwanted styles and want to delete/clean this up. I only want to keep what's highlighted.By the way, I found style editor and template creation quite tedious & convoluted.
Dell T3500
Intel Xenon CPU
15 MB RAM
64-bit operating system
NVIDIA Quadro 5000
AutoCAD Civil 3D :: How To Delete Unwanted Reference File Data
Apr 5, 2012i want to delete unwanted reference file (xref) information outside boundary of a current drawing.using civil 3D or autocad.
Lightroom :: 4.1 - How To Delete Unwanted Catalogue
Apr 23, 2012I installed LR4 Beta, and imported some photos from my LR3 installation. Probably not the wisest approach I now realise.
Now that I have purchased LR4 (upgrade), and installed it including RC4.1 I realise that I have a catalogue that only contains the images I imported with the Beta version. I still have the original images, and sidecar files in my LR3 catalogue. What I want to do is remove the LR4 catalogue that I currenly have, and then export my catalogue from LR3 and import into LR4. I think I am OK with the Export / Import bit (I have Martin Evening's excellent book). What I don't know how to do is remove the catalogue, or contents thereof from LR4. I could of course just remove all the images from the catalogue by deleting them but I want to be careful here, as I got into this situation by doing things the wrong way in the first place.
System
Windows 7 64-Bit
LR4.1 and LR3.6
Photoshop :: CS5 / Delete Unwanted Profiles In List?
Sep 28, 2012I've got CS5 and I'm still learning the ropes. I've advanced to creating my own ICC print profiles, which I'm using. CS5 has a long list of these in the print dialogue. I have occasionally updated the profiles that I have created ( which now appear in this list). I want to keep the list up to date with regards my own profiles and delete the ones that have been superceeded. I've looked through my folders (Windows 7) but I can't find where they are stored.
how I delete unwanted profiles in the list? Can it be done whilst in CS5?
Lightroom :: 4.1 - Delete Unwanted Export Presets?
May 19, 2012Mac OS X 10.7.4, Lightroom 4.1. File>Export Presets has two groups: Lightroom and User.
Under 'Lightroom' there are a number of duplicated items which I would like to delete (cleanup).
In Library>Application Support> Adobe> Lightroom>Presets>Export . there is ONLY User. No 'Lightroom.'
Lightroom :: How To Delete Unwanted ICC Profiles In Print Module
Apr 13, 2013Is there a way to delete unwanted ICC profiles in the print module?
Revit :: Delete Unused Or Unwanted Walls From The Properties List?
Feb 1, 2012How does one delete unused or unwanted walls from the properties list?
Lightroom :: Process To Delete Unwanted Catalogs From Listing That Comes Up When Loading 4
Jun 25, 2012What is the process used to delete unwanted catalogs from the listing that comes up when loading LR 4? Any web article on the general subject of deleting unwanted catalogs?
Lightroom :: Delete Unwanted File Renaming Presets Used When Importing?
Jun 5, 2013I've created a number of presets for renaming files when importing into Lightroom 4.4. How do I get rid of presets that I no longer want?
AutoCad :: Delete Some Same Objects For All Layout?
Feb 1, 2012I have one drawing, which has 79 layouts itself. I want to delete some same objects for all layout. Is there any command to edit all layout at one time.
AutoCAD Visual LISP / AutoLISP :: Insert Another Drawing Layout Tabs Contents In Current Drawing
Mar 7, 2013I want to insert another drawing layout tabs contents in current drawing.
It's easy for MODEL tab, but for LAYOUT tabs, I dont know how!?
I prepared a code for INSERTING MODEL tab in current drawing:
(defun INS_DWG (TAB path dwg P / blk)(setq blk (strcat '*' path dwg ''));(setq N (vla-get-count (vla-get-layouts)));;Number of LAYOUT TABS in dwg(if (or(= TAB 0) (= TAB nil))(command 'INSERT' blk P 1 0)); TAB=0 or omitted >Insert MODEL;(if (= TAB 1));>Insert the 1st LAYOUT in dwg file;(if (= TAB 2));>Insert the 2nd LAYOUT in dwg file;and so on..);;;usage:;;(INS_DWG 0 'c:test' 'test.dwg' '(0 0))
AutoCad :: Can't Select Anything To Export From Layout
Apr 12, 2011drawing created, set image in perspective, hide, used 3dOrbit to position and so forth to what wanted. Then create new layout which shows just fine.BUT can't 'select' anything to export from layout. If try to export directly from drawing sheet it exports hidden lines and is white on black (which don't need or want in an advertising image).I KNOW this can be done since I did it 10 years ago, got nice clean images (for a number of products I sell) as *.wmf files that I have been using since then. But, have lost some of images and having a problem updating my company catalog (but need to recall how to do this as may need different drawings in the future-I did it before). Have read mentions here of JPGOUT command but that doesn't work on my AutoCAD 2000.
AutoCad :: Action Macro - How To Select Last Layout Tab
May 3, 2012I want to make a action macro that selects the copy the last layout tab, copy that, goes modelspace and -pan @some numbers, go back in modelspace. stop.
I've recorded the following steps successfully:
Layout
copy
<Enter>
<Enter>
and
mspace
-pan
(basepoint plus some mumbers)
(@-3000,0)
I would like to know the command for selecting the last layout tab. Without using right-click functions which, as I know of, are not recorded?
AutoCad :: Select Certain Lines In Order To Delete Them
Oct 26, 2011I am having trouble trying to select certain lines in order to delete them.I am using AutoCAD 2009.
I am needing to import my map to a program to use.When I import the map the program is only showing the useable portion of the map in the top right corner because there are some invisible objects hidden at the edge of the .dwg file. When i hit cntrl+a, these show up but otherwise I can't select them. I would like to know how to make these items selectable so i can delete them.
AutoCad :: Select Objects In Multiple Layout Tabs?
Aug 4, 2011I want to be able to select all my viewports in all my layouts at the same time. Is this possible? Qselect only catches objects in the current tab.
AutoCAD 2010 :: Unable To Delete / Move Or Select Viewport
Aug 13, 2013Something that's been driving me around the bend lately. I have a drawing, with a viewport which I cannot select. I have unfrozen all layers, ticked the 'Selection Cycling' box, but no lines show. It's just there, a viewport, but with no viewport polyline. No way of deleting, or clipping, or doing anything with it.
AutoCAD Visual LISP / AutoLISP :: Pause To Allow User To Select Layout Tab
Sep 13, 2011I need a command that will allow the user to select a layout tab. I thought the following would work, but it just ends the LISP program:
(command 'layout' 's' pause)
Lightroom :: 4.3 - How To Delete Layout Preset In Book Module
Mar 29, 2013In Lightroom 4.3 I have saved several of my own Auto Layout presets in the Book Module.I want to delete some of them. How do I do this?
AutoCad :: Drawing For Each Layout?
Nov 3, 2011I have been using one drawing with in 50 Nos. layouts. Now I want to make the separate drawing for each layout. What should I do? Is there any lisp for do the above function?
AutoCad :: How To Create PDF Of Drawing From Layout
Feb 12, 2013recently switched from 2007 to 2010. All of my dwgs in 2010 were created in 2007. When trying to create a pdf of any drawing from any layout..adobe has difficulty reading layer/plot style info..it prints everything gray. I've tried pretty much everything and now think it has to do with importing something (maybe plot style?) from my earlier version? I don't know.. need getting my plot style to be read properly by adobe.
AutoCAD LT :: Orientation Of Drawing In Layout
Mar 15, 2011A client gave us a file in which the drawing in model space has an orientation wherein the N is in positive y-axis. But if I go to layout (viewport), the orientation of the drawing is different, N is 45 deg from the x-axis. How does the orientation of a drawing in layout (viewport) changed without changing the original orientation of the drawing in model space?
AutoCad :: How To Set Drawing To Layout And Print It
May 22, 2011how to set out a drawing to a Layout from model space?
AutoCad :: How To Make Each Drawing To Be Placed On Different Layout
May 9, 2012In the model space, i have 1 sheet and have 3 different drawing in it( lets say , i have a circle, a polygon, and a rectangle).
How can i put the circle on Layout1 , the polygon on Layout2 and the rectangle on Layout3.
AutoCad :: Delete Drawing But Not The Name?
May 1, 2012i can delete the drawing but not the name??
AutoCAD 2010 :: Converting A 3D Drawing To A 2D Layout?
Feb 15, 2012I am having an issue with a 3D drawing (xref) with size very large and crashing due to lack of memory. I want to compress it into a 2D layout. How do I compress a 3D drawing into a 2D drawing or something much smaller than the 47 MB it is now?
A necessary part of many AutoCAD® users’ day is cleaning up drawing files. Not all users set up their drawings with your use in mind, and sadly some don't set it up with anybody's use in mind. There are a variety of reasons that AutoCAD users would need to clean up drawings.
- MEP users who receive updated backgrounds from architects or civil engineers.
- Architects who receive clients’ prototypical drawings that need to be converted to the architects’ standards.
- Architects who receive civil drawings to clean up for an architectural site plan.
- Autodesk® Revit® users who need to clean up AutoCAD drawings before linking or, in some cases, importing them into Revit.
- Architects and engineers who clean up their drawings before sending them to an outside consultant or owner.
- Archivers who need to clean up drawings for archival purposes.
Many times, users will clean up drawings only when they have to, such as for errors (crashing drawings, inability to import in to other applications), or files being too big to email, etc. By keeping the cleanup process simple and automating as much as possible, it is more likely to get done on a regular basis. As we all have experienced, issues tend to hit on deadline day.
Everything starts with good habits and procedures. Start by keeping your drawings lean and efficient. Use standard layers, linetype, and text styles. Use polylines, and polygons when creating objects, use explode as a last resort and use blocks/dynamic blocks to represent your drawing data. Automate your drawing standards, and object insertion processes verses copying one job to create another. Sometimes, even with good drawing practices, files will need to be cleaned up. And when dealing with outside users, cleanup is a lot more likely.
AutoCAD has some built-in tools that can help make the drawing cleanup process much easier. These tools can be used individually to handle certain cleanup tasks, or they can be used in conjunction with others to handle larger cleanups. A few of the tools that you may find useful are “Purge,” 'Audit,' 'Selectsimilar,' AND Wblock.
A brief outline of what you would use each command for and then a more detailed description of how they can be used for your cleanup purposes follows, as well as some example scripts on how to automate their use for drawing cleanup. Some of these commands have dialog and command line options, so depending on your productivity style, you have options. If you are a mouse dialog, ribbon, or toolbar user, I encourage you to consider the command line versions to increase your productivity. The command line can be a powerful production option, especially when combined with shortcuts and Macros.
- PURGE: Removes unused named objects, such as block definitions and layers, from the drawing using a dialogue or the command line.
- AUDIT: Evaluates the integrity of a drawing and corrects some errors (command line).
- SELECTSIMILAR: A simple method to select objects based on similar properties such as layer, color, name, or line weight.
- WBLOCK: Saves selected objects out of the current drawing or converts an existing block to a specified external drawing file.
PURGE
Over time, drawings get bloated with unnecessary and outdated information. This can include unused layers, linetypes, fonts, styles, and blocks. By getting rid of these extraneous items you keep your drawings lean. Lean drawings use less memory and have less storage requirements, thus saving drive space, backup space, load and save times, and email overhead. Lean drawings also are less likely to become corrupt. The following types of unused named objects can be removed from the current drawing: block definitions, dimension styles, groups, layers, linetypes, and text styles. It will also remove zero-length geometry and empty text objects. The PURGE command will not remove unnamed objects (see below for unnamed blocks).
Purge can be done from the command line or through a dialog box. For various scenarios you may use one or the other. See Figure A for the Purge dialog box from AutoCAD 2013. The dialog shows that basically no items are available to be purged. If you change the top option from “View items you can purge” to “View items you cannot purge,” you can see all the things that are not “purgeable.” Are these still being used? These can include styles, linetypes, layers, plot styles, and so on. If you don’t think you are using these, but items will not purge, then check some of the following.
Blocks:
- Could it be nested inside another block?
- Is it an attached Xref?
- Is it an anonymous block that just won’t purge? (*A…)
Layers:
- Is it a standard AutoCAD layer (0 or Defpoints)?
- Is it used in part of a block definition?
- Is it set current?
- Does it have a block inserted on it?
Styles:
- Could it be used in a dimension or mleader style?
- Is it set current?
Linetypes:
- Could it be used in a layer that is not being purged?
- Is it set current?
- Is it part of a block definition?
Figure A: Purge Dialog (Version 2013)
-PURGE (command line)
Purge also allows you to remove unused ‘named’ objects from a drawing at the command prompt. You can only remove one level of nested items at a time, so you may need to repeat the process until there are no items left to be purged. (Create a macro or script to automate this.) The PURGE command will also remove un-named objects (zero-length geometry or empty text and mtext objects starting in 2010). Even when using the “All” option, purge by default will not remove REGAPPS**. Basic prompts and typical responses are below when typing “-purge” (the quotes are not required).
Enter type of unused objects to purge: “A”
Enter name(s) to purge: “*”
Verify each name to be purged? “N”
** One item that will need an extra step is “REGAPPS.” Regapps are a byproduct of objects with extended entity data (xdata). When you delete an xdata object, a REGAPP ID remains. To remove these, you must do it from the command line.
–Purge <enter> R <enter> * <enter> N <enter>
Anonymous/Un-Named Blocks
Annoying items that creep up quite often are the infamous “un-named”or “anonymous” blocks or groups. These show up as *A123, *A124, *X12, *D13, etc. You may have noticed that when you ran Audit, there were far more blocks in your drawing than you thought there should be. This builds over time as you continue to use old projects for new work and when you use outside vendors or consultants’ drawings. It can be very frustrating to find 1,000 blocks in a drawing that do not show up in your block list and will not purge! Some of these are created by AutoCAD for hatch patterns [*X nnn], associative dimensions [*D nnn] and some are created by AutoLISP routines. For me this happens a lot when working with drawings from civil and architectural offices. To remove the blocks that are not being used, you can use the Wblock or –Wblock command (see WBLOCK).
*Unnn = anonymous blocks
*E### = anonymous non-uniformly scaled blocks
*X### = anonymous hatches
*D### = anonymous dimensions
*A### = anonymous groups
AUDIT
From time to time you will get a file that requires recovery to open it, or during a working session you will get an error suggesting that a recovery may be necessary. One way to keep your drawings healthy is to be proactive and run the audit command. Audit is a good maintenance tool to run on your drawings to keep them clean of most errors. When you get drawings from outside firms, this is a must-do step. If a drawing contains errors that AUDIT cannot fix, try using RECOVER to open the drawing and correct its errors.
Audit is a command line tool. Following are the prompts and options.
- Type “Audit”
- The following prompt is displayed.
- Fix any errors detected? [Yes/ No]. You would typically choose “Yes,” unless you’re just looking to see if the drawing has errors.
- When the routine is done it will give you a status report of how many objects it audited and how many errors it found and corrected. Running Purge prior to an Audit will often reduce the overhead of auditing items you do not intend to keep anyway.
Note: If AUDIT or RECOVER do not work and your still getting errors, try inserting the troubled drawing into a clean empty drawing, EXPLODE it, PURGE, and do a SAVEAS.
SELECTSIMILAR
How many times have you worked on a drawing where you were just looking to get just line work or just text isolated on a layer? You try to freeze or isolate text or dims only to find out that half the drawing disappeared. This is a common issue with various trades where everything associated with a specific topic is on a single layer. For example, an architectural drawing has a ceiling plan layer: 'A-CLG' that includes the grid, the lights, the diffusers, the notes, and the dimensions all on one layer—in different colors (ugh!). Or how about an HVAC drawing that has the main ducts, flex ducts, and supply grille/diffuser blocks all on a single 'M-SUPPLY' layer. Sometimes you just need the lights or grid or supply grille locations, but doing layer isolate (another handy tool) gives you everything. Selectsimilar to the rescue!
Selectsimilar provides you with a way to select objects based on similar characteristics. Objects based on properties such as layer, color, or lineweight can be grabbed quickly with this command. Access the command by typing “selectsimilar” at the command line or from the right-click shortcut menu after you've selected an object. What is selected will depend on the current SELECTSIMILARMODE value.
If you have objects with a different color being included when selecting objects based on color, note that objects are considered similar if they are set to “BYLAYER.” This also includes properties like linetype, lineweight, plot style, material, and transparency. For example, you may get text or line work selected even though they are not the same color if their color property is set to BYLAYER.
To select similar objects, you can type “SELECTSIMILAR” (create a shortcut like “SS”) or select an object that represents the category of objects you want to select, right-click, and choose “SELECT SIMILAR.”
Note Only objects of the same type (lines, circles, polylines, etc.) are considered similar. You can change other shared properties with the SELECTSIMILAR command, using the “SE” (Settings) option.
The Settings dialog box controls which properties must match for an object of the same type to be selected.
[AW-2013-12-AutoCAD-Image-0004.png]
- Color – Considers objects with matching colors to be similar.
- Layer – Considers objects on matching layers to be similar.
- Linetype – Considers objects with matching linetypes to be similar.
- Linetype scale – Considers objects with matching linetype scales to be similar.
- Lineweight – Considers objects with matching lineweights to be similar.
- Plot style – Considers objects with matching plot styles to be similar.
- Object style – Considers objects with matching styles (such as text styles, dimension styles, and table styles) to be similar.
- Name – Considers referenced objects (such as blocks, xrefs, and images) with matching names to be similar.
SELECTSIMILARMODE
To automate the SELECTSIMILAR command in a macro or script you would use SELECTSIMILARMODE. As with many AutoCAD commands, each combination of options has a bit code (numerical value). Some examples:
- Select color only = 1
- Select Color and Layer = 3
- Select Color and Name = 129
- Select Layer and Name = 130
To determine these values, run the SELECTSIMILAR command, type SE, and toggle the options. Then run the SELECTSIMILARMODE command to find the numeric value of these options.
I use '130' most often. This allows me to isolate named objects like 'Text' on the same layer. Using Selectsimilar to select a piece of text on a layer would select all text on that layer - no matter what style or color it is. Selecting a polyline with the 130 setting would select all polylines on that layer - no matter what color. Selecting a block would only select other blocks with the same name on that layer. Each of these is useful when selecting items that you may wish to delete or move to another layer.
WBLOCK
The WBLOCK (Write Block) command is probably best known for saving selected objects or a block within a drawing to an external drawing file. WBLOCK can be a very powerful cleanup tool in your arsenal. Probably the most common method of drawing extraction is to type WBLOCK and follow select the options in the dialog to save parts of a drawing to a specific drive and folder.
How To Remove Unwanted Layers In Autocad
The dialog gives you three options: You can choose a block within the drawing, the entire drawing, or objects that you want to selectively ‘write out’ of the drawing. When selecting objects, you select a base point, select the desired objects, and then select a new name and path where your file is to be saved.
You also have the option to access the quickselect dialog to select items via a properties filter.
View Layers In Autocad
You can also use WBLOCK from the command line. To use WBLOCK at the command line, add a hyphen in front of the command, e.g., -WBLOCK.
It will then prompt you to enter a name of an existing block or define a new drawing. You have three options here.
- Type an existing block name within the drawing that you want to “write out.” (Use if you have created a block in the current drawing and you want it now saved out to your master library or a project folder.)
- Hit enter and a new drawing will be created with the name you entered in the previous dialog. You will be able to select an insertion point and select the objects to write-out. (Use if you want to selectively write out objects to a new drawing file.)
- Type an asterisk ‘*’ which will cause it to write out the entire drawing. (Use to do a mass cleanup of your drawings in a single sweep.)
When cleaning up client drawings or your own from rogue data that has been inserted (often through copy-paste operations), this is a very powerful tool. This handy method writes the entire drawing to the new output file, except for unreferenced symbols. Model space objects are written to model space, and paper space objects are written to paper space.
If you use the dialog to do your WBLOCK operations, even when you selectively choose your objects, takes all the junk with it that you already can’t purge.
Try this:
- Open a drawing that has unpurgeable items (bunch of *A1nnn blocks) Say “A1.DWG”.
- Turn On, Unlock, and Thaw all your layers.
- Type WBLOCK and choose the “Objects” option.
- Select everything in your drawing (crossing, window, etc.).
- For the Destination, choose a new file name “A1-Objects.DWG.”
- Type AUDIT and see how many objects are in the drawing.
- Compare your size to the original A1.DWG.
Then try this, with the drawing still open:
- Type WBLOCK and choose the “Entire drawing” option.
- Choose a new name “A1-Entire.DWG.”
- Type AUDIT and see how many objects are in the drawing.
- Compare all your sizes now.
- : )
Wblock Results:
Before:
(Already Purged), Audit reports 114,900 objects and 3,478 blocks - 4,327 KB.
After:
WBLOCK (Entire drawing option OR –Wblock with “*”), Audit reports 4,600 objects 71 blocks - 291 KB (93 percent smaller).
The second option removes all those unused and unpurgeable items that the first would not. See how much faster your drawings open, save, and close.
++ Be careful, though, as both of these methods will remove any Layer States in the drawings.
AUTOMATE YOUR CLEANUP PROCESS
By combining a mixture of the tools above along with some other AutoCAD commands, you can reduce the cleanup time dramatically with Macros, Scripts and Scriptpro. Although macros have been my standard automation tool, it is often easier to use scripts so that you can do batch automation with Scriptpro, a free utility from Autodesk that can be found on the Autodesk website.
Example macros:
SuperSave:
^C^C -PURGE;A;*;N; -PURGE;A;*;N;AUDIT;Y;-PURGE;A;*;N;ZOOM;E;SAVE;CLOSE;
Superpurge: (includes Regapps and WBlock)
^C^C-PURGE;A;*;N;AUDIT;Y; -PURGE;A;*;N;-PURGE;R;*;N;AUDIT;Y;-PURGE;A;*;N;-WBLOCK;
Sample Macro in CUI
DeleteSimilar:
^C^CSELECTSIMILARMODE; 130;SELECTSIMILAR;/ERASE;P;
Note: be sure to define your “similar” mode in your script/macro by setting the “selectsimilarmode” value.
If you have to commonly bind and save your drawings to an older version (SAVEAS), you can have a Macro setup just for that.
^C^CZ;E;-PURGE;A;;N;AUDIT;Y;-PURGE;A;;N;-PURGE;R;*;N;-PURGE;A;;N;BINDTYPE;1;-XREF;B;*;SAVEAS;2004;
There is not one “super cleanup” command or macro tool that will work for everyone, but you can get pretty close to what will equate to “your” super tool with a little thought. Look at your cleanup process—what are you repeating or what is client “A” always requiring as part of the cleanup process? Automate these items using the tools above and tweak as necessary for each client.
Let’s say you want one ultimate macro that varies slightly by client, but is pretty consistent overall. Some things you may want:
- Set consistent Units – Use the units command options.
- Want the drawings to be lean and error free – Use Audit and Purge.
- All items to be color by layer – Use the SETBYLER command (Thaws and Unlocks all layers).
- Want the layers to be consistent – Use client-specific Layer States.
- For clients that use the standard AutoCAD font style as “their” standard – Rename it to ARCH-STANDARD.
- Saved when zoomed to extents – Use Zoom, extents.
The below macro would accomplish that and would take literally seconds to run.
^C^C-UNITS;4;16;1;0;0;N; -LAYER;T;*;ON;*;UNLOCK;*;; -PURGE;A;;N;AUDIT;Y;-PURGE;A;;N;SETBYLAYER;ALL;;YES;YES;Z;E;-LAYER;A;I; F:/CUSTOM/LAYER_STATES/CLIENT_NAME/CLIENT.LAS;R;DESIRED_STATE;;; -RENAME;S;STANDARD;ARCH-STD;Z;E;SAVEAS;
Items in BOLD would vary by client.
If every job is totally unique for you and you need a generic macro, you would remove the layer states option above and you may want to skip the SETBYLAYER command as it may give undesired results when plotting.
After the macro runs, you could use some of the other tools mentioned above to clean up the drawing even further.
Standardization, automation, and training are the best tools for increasing your efficiency in any process in AutoCAD. Once you find out which tools (commands/macros/scripts/LISPs) are your go-to items and you have a set process, you can whip through the drawing cleanup process. Over time I have standardized on many of the above commands and macros, but I am always looking for new options to reduce any repetitive or time-wasting tasks.
TEST
Test, Test, Test! When incorporating new tools and methods into your arsenal or cleanup process, be sure to test on non-production drawings or at least copies of drawings before you implement these as standard tools. Each office may have unique file requirements that need to be considered when implementing these processes.
OTHER TOOLS
This article by no means covers all the tools available for drawing cleanup, but these are some very useful ones that when used individually or in conjunction with others can make your drawing cleanup process go much faster. As there are a multitude of options and tools available in AutoCAD for cleaning up your drawings, I encourage you to look in to some of these other powerful commands and AutoCAD options:
SETBYLAYER:
Sets selected objects to color BYLAYER (as they should be). You can also use this to change the linetype, lineweight, material, and transparency to BYLAYER. Like SELECTSIMILAR, SETBYLAYER has a mode value (SETBYLAYERMODE) that can be set (i.e., for color only the value is 113). I typically do NOT change linetype to BYLAYER as it is a common scenario to have a linetype set to by entity but on the same layer with other line types.
FILTER:
To create saved selection sets.
QUICK SELECT (QSELECT):
Use to select different types of objects that share the same properties such as color, linetype, plot style, lineweight, transparency, etc., and build a selection set on the fly.
OVERKILL
Use to remove duplicate items in a drawing that share the same space (i.e., doors, walls, lights, etc.) right on top of one another. This often happens when binding similar XREFs or copying items and inadvertently selecting the same origin and destination point and not realizing it.
Clean efficient drawings make for happy users!
Appears in these Categories
- Language
- Country
- Software Products
- AutoCAD Platform