Showing posts with label purge. Show all posts
Showing posts with label purge. Show all posts

February 23, 2016

Improving AutoCAD Performance with ScaleList and RegApp CleanUp Utilities

The Ideate tech team has seen a recent increase in cases related to poor performance, slow opening and saving of files, and a number of crashes when using basic AutoCAD commands.  When these types of issues occur, one of the first things we look at is file size (is the file larger than expected) and file cleanup tools. 

Two of the most common contributors to abnormal file size and poor drawing performance are Scale Lists, and RegApps. When the number of these items in a file increases, so does the file size, which hinders drawing performance.

The AutoCAD Scale List is a list of pre-defined drawing and annotation scales that are saved in a drawing file. Scales can easily be selected from the list to automatically resize any annotative content, like lineweights and annotative text, dimensions, and multi-leaders. Scale Lists can also be used to quickly set a scale for viewports created in a layout tab. In order for a scale to be selected, it must be defined and included on the list. Scale lists are also updated to include scales from external reference (XREF) files and other objects that contain scales that were not previously defined in the drawing’s original Scale List. This can add tens or even 100+ scales to an existing drawing, many of which aren’t necessary for final plan sets. Scale Lists should be cleaned of excess scale values when possible.

In the case of RegApps, according to Autodesk, RegApp is short for “registered application." It is linked to “extended entity data” (XDATA) that is attached to drawing objects through use of Autodesk’s provided APIs. Unreferenced RegApps appear in a drawing when the original objects that contained XDATA are deleted from the file.  Because the RegApp remains after the object has been deleted, it’s an extra bit of data that contributes to larger file sizes and negatively impacts performance of a drawing. Unregistered RegApps need to be purged from a file in order to remove them from the drawing’s database.

Scale Lists and RegApps can be manually removed from individual drawings using a couple of drawing cleanup commands, but there are some misunderstandings that we’ve run into in the past as well.

The SCALELISTEDIT command can be used to access the Edit Drawing Scales dialog box. From the dialog box, you can delete existing scales from the drawing, or use the Reset option to reset the scale list to the default values. Although they are similar, the results of the two options are quite different. If you select all scales in the drawing (you can use shift+left click to select multiple items) and use the Delete option, only scales that are not in use will be deleted. Any scales that are currently referenced in the drawing will remain on the list. If you chose the Reset option instead of delete, you will be prompted to select a default scale list (imperial, metric or both). In this case, the existing scale list will be replaced by the default option selected. Any custom scales added to the list will disappear, along with any unreferenced scales. You may also end up adding additional unreferenced scales since it is importing a full list of defaults rather than just what’s being used in the drawing. In any cases, both options should help with issues related to excessive scales, but the Delete option does appear to reduce the number of scales in the file more than the Reset option.

RegApps must be purged from a drawing, but they are not found in the standard PURGE command. In order to access the RegApps option, the –PURGE command must be used. Adding the “-“ symbol to the front of an Autocad command like PURGE will give you access to the root options built into that command. The list of additional purge options will appear and allow you to select these added features along with the standard objects that the PURGE command allows.


One of the biggest misunderstandings with this –PURGE list is the “ALL” option located at the bottom. Although it says ALL, that option does not include everything in the list. The PURGE command is also limited to removing one level of reference at a time, requiring multiple uses of the PURGE command in some cases before all unused data has been removed. For RegApps, Zero-Length Geometry and Orphaned Data, these items must be selected individually for removal and are not part of the “All” option. The Purge command also does not remove unnamed objects from blocks and locked layers, so some of these may remain in the file after the process is complete.

The two commands mentioned above (ScaleListEdit and –PURGE) are individual drawing based commands. In order to help with the cleanup process of multiple files, Autodesk has created two utilities that can be downloaded and added to your Autocad installations. Both utilities are setup for multiple files (batch processing) and work in a dialog box external to the Autocad application, eliminating the requirement for each file to be opened and cleaned manually.

The RegApp ID Cleanup Utility can be found here (for versions 2008-2016). 

The ScaleList Cleanup Utility can be found here (for versions 2008-2016).

The links also include instructions on how to install the utilities and how to run them after installed. The files need to be copied to the Autocad installation folder for the version you are installing, which is typically found at: C:\Program Files\Autodesk\AutoCAD <version> 

The CleanupRegapp.exe will launch a dialog box that looks like this:


From here, you can load files or select entire folders for removal of RegApps in one bulk process. This is extremely useful in the case of XREF files, where RegApps in an XREF may carry over back to the base file even after that file has been purged.

The CleanupScales.exe file launches this dialog:


From here, you can select files or folders and choose to remove unreferenced scales down to a user defined max value and select a reference template for populating the new scale list similar to the Reset option.

On a recent support case, using these utilities on a set of 18 drawings in a project folder removed over 200,000 RegApps and 500+ Scales from the scale list, and some drawing files were reduced to 50% of their original size, which significantly improved performance in Autocad.

Next time you’re running into issues with poor performance or long lag times and freezes when working with basic commands, remember these two utilities and see if they are able to fix the problem. And for more information on drawing housekeeping tools in AutoCAD, check out this post from fellow ENI Tech Daniel Armstrong. 

Thank you for reading. For more information on AutoCAD and other Autodesk products, and information on training and consulting for the various products Ideate services, visit our website at www.ideateinc.com.

ENI Manager & Senior Application Specialist

Matt is an ENI Manager and Senior Application Specialist in Ideate, Inc.’s Seattle office. He has a B.S. in Mechanical Engineering and is a licensed Civil Engineer. Prior to joining Ideate, Matt worked as a civil engineer, using Civil 3D on a variety of projects including site development, roadway improvements and infrastructure design. With over 10 years of experience in the civil engineering industry, Matt now provides training, consulting, technical support, and implementation strategies for organizations transitioning to Civil 3D. Matt is an Autodesk Certified Instructor (ACI), as well as an Autodesk Certified BIM Specialist: Roads and Highway Solutions. Additionally, Matt is and Autodesk Certified Professional for AutoCAD, and AutoCAD Civil 3D. He can be found on twitter as @MattM_PE

November 4, 2015

AutoCAD Drawing Housekeeping


As an Application Specialist at Ideate, one of my primary roles is to provide technical support to our customers. I'm still surprised to discover that many support cases are related to drawing file housekeeping. Periodically running the following commands could save an AutoCAD user hours of time and frustration:
AUDIT
RECOVER
RECOVERALL
-PURGE (All, Regapps, Orphaned Data). 

AUDIT
Use this command when the drawing is open. It attempts to find and fix drawing errors.  I recommend running AUDIT at least once a day.
RECOVER
Use this command when the drawing is closed. It tends to do a more thorough job of fixing errors than the AUDIT command. I recommend running RECOVER on a drawing weekly.

RECOVERALL
This command will not only run RECOVER on your host drawing but all of its drawing Xrefs as well. Upon completion, a report is generated that can be copied to the Windows Clipboard and pasted into Notepad or MS Word for review. I recommend running RECOVERALL weekly on a drawing with Xrefs.

-PURGE
This is the command line version of PURGE. It gives you additional 'object' types to purge out of your drawing not available in the classic version; such as unreferenced REGAPPS. I recommend running -PURGE>All and -PURGE>Regapps bi-weekly on your host drawing and its Xrefs.

 
The important point about purging Regapps is that an excessive amount of unreferenced Regapps can cause drawing performance issues. Your host drawing can even get them from Xrefs. Recently I ran the command on a customers' drawings that couldn't be referenced; many had over 80K!  Afterwards, they stayed attached and opened much faster.

Another object type that should be purged is Orphaned data, -PURGE>O.  Unmapped DGN linotypes can unexpectedly bloat the size of the drawing causing serious performance issues. This option is available out-of-the-box beginning with AutoCAD 2015. A DGN hotfix is available for AutoCAD 2012, and for AutoCAD 2013-2014 products. 

If it gets to the point where you are constantly having issues with your drawings to include crashing, the Autodesk Knowledge Network article on How to repair corrupt AutoCAD files is a great resource. It includes all the drawing housekeeping commands discussed above as well as workarounds for saving most of your data.

Lastly, please submit the Autodesk Customer Error Report with your email address each time an Autodesk product closes unexpectedly/crashes and the dialog appears. You may not think sending them in will help you. However, they are used by the development team to identify defects for Hotfixes and Service Packs. A potential immediate benefit is that we can create an Autodesk Support case asking to locate the CERs, review them, and provide feedback on what may be causing the crashing.

So, as you are feverishly working on your design projects, remember to periodically run the above drawing maintenance/housekeeping commands.  They only take seconds to run, but can save you hours of lost time and frustration. Now if only Autodesk had some commands to keep my cubicle in order and clean.
  
Thank you for reading. For more information on AutoCAD and other Autodesk products, and information on training and consulting for the various products Ideate services, visit our website at www.ideateinc.com.



ENI Application Specialist

Daniel is an Application Specialist for Infrastructure Solutions at the Ideate Sacramento office. He is a California licensed Civil Engineer and LSIT with over 9 years land development design experience and 6 years Civil–GIS software consulting. Additionally, he provided 6 years of engineering support at a municipal public works department. At Ideate, Daniel assists Civil Engineering and Surveying firms in maximizing their utilization of AutoCAD Civil 3D through consulting, training, mentoring, and technical support. He conducts standard classroom and custom training on AutoCAD, Map 3D, and Civil 3D.
 

February 11, 2015

Removing Un-purgeable Linetypes using the Layer Translator for AutoCAD

I finally discovered a way to quickly remove line types that are seemingly un-purgeable.  This problem has come up many times while I’m on tech support here at Ideate Inc.  I found the solution buried in an Autodesk forum. This method uses the Layer Translator in an unconventional way. 

The Issue

You’ve inserted a drawing into your drawing.  After doing this, you realize the file is gigantic due to the extra line types and other objects that were inserted.  You then run purge multiple times, yet the line types are still there.



The Solution

1. Open the Layer Translator in the file that you are having an issue. The layer translator can be found on the manage tab.




2. Under the right hand box, choose the button "Load..." browse to the same file you have open (the file you are purging line types) This is the illogical part, but the Layer translator only brings with it the actual layers and settings that have been set in the manger. The extra line types not being attached to any specific layer are left out.





3. Once Layers have loaded select "Map Same" button in the middle of the two upper boxes.


 

4. Once the layers have been mapped they will show as having disappeared from the left hand box and all the layers will appear in the lower box. Select "Translate" button at the bottom.


 
5. On the next pop up select Translate Only.


 
6. After the translation is done, run the purge all command.

7. Run the audit

8. Purge all again.

9. Type in LT to pull up dialog and confirm that all excessive line types have been removed.

 

 


Kate Ming, P.E.
Ideate AEC Application Specialist

Kate is a California licensed civil engineer with a BS in Civil and Environmental Engineering from UC Berkeley. Prior to Ideate, she worked at a multinational company for four years doing general civil design on large infrastructure projects. She is versed in roadway, rail, utility design and site development. She also has experience with utility demand analysis and Low Impact Development plans. As a Civil 3D Autodesk Certified Professional Kate provides training and support for Civil 3D, AutoCAD, and InfraWorks.