Showing posts with label -PURGE. Show all posts
Showing posts with label -PURGE. Show all posts

April 18, 2017

Help! My .dwg Is Too Large For Email

I was on tech support when a client called in with a question about making a .dwg file smaller. The client had used Revit to export a floor plan to a .dwg to hand off to a consultant, but once exported, the file size was too big to send via email.

In response, I shared some things to consider when exporting a Revit view to a CAD file:

  • Although exporting a view creates a .dwg, it doesn't create an optimized .dwg. Here are a couple of ways to try to optimize it:
  1. After exporting the view to a CAD file, open the .dwg in AutoCAD, use the PURGE or the -PURGE commands to purge the model and clean up the file. 
  2. Save the file.
  3. Check the file size. Is it smaller? If not, go to the next bullet point.
  • After the .dwg has been exported, open the file.
  1. Use the WBLOCK command to create a new .dwg using the Entire drawing option. See the image below.
  2. Specify a location and name for the new .dwg.
  3. Specify the Insert units for the .dwg.
  4. Press [OK]. This will create a new “native” .dwg from the exported Revit view .dwg. This .dwg should be optimized and be the absolutely smallest the CAD file can get without deleting geometry.
  5. Check the file size. The file should be smaller and optimized for working with AutoCAD consultants.



Use this process to optimize and reduce the size of your exported .dwg files prior to sending to consultants. 

Until next time, 
Ron

For more information on the software solutions, training and consulting Ideate provides, please visit the Ideate Inc. website.


Ron Palma
AEC Application Specialist
Ron has 25+ years of experience in the architectural industry as a drafter, designer, lead project designer, trainer, and a CAD manager implementing Autodesk Architectural Solutions for residential design firms. His instructional accomplishments include: Autodesk Certified Instructor (ACI), trainer, support technician, educator at Portland and Clackamas Community Colleges, as well as a U.S. Army certified instructor. Ron holds a BA in Instructional Design suma cum laude, is a member of the Oregon Army National Guard, where he is a First Sergeant of an Infantry Company, specializing in training and mentoring soldiers in their careers, and has been deployed to Afghanistan in support of Operation Enduring Freedom and Operation Resolute Support. Ron is a published author and continues to write professional technical training manuals and shorts for AutoCAD, AutoCAD Architecture, and Revit. As an Autodesk Certified Instructor and Revit Architecture Autodesk Certified Professional, Ron continues to provide Revit Architecture and AutoCAD training and support for various AEC firms. @RonPalmaAEC

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.