Presentation on theme: "While you are waiting: Please turn your communication devices off or silence them Fill in the top part of the evaluation form Leaf through your handouts."— Presentation transcript:
While you are waiting: Please turn your communication devices off or silence them Fill in the top part of the evaluation form Leaf through your handouts and think about questions Enjoy the music We will start in a few minutes.
How to Clean Anything in AutoCAD® GD401-1 Helen Gorina –HLW International LLP
Datasets in AutoCAD are a collection of files which are needed to produce graphic output for an entire project or its subset. 1.Automate common cleanup tasks 2.Clean up and (re)-organize layers 3.Analyze and (re)-organize XREFS and other reference files Q & A – at the end of the class Class Objective: Dataset cleanup
Scenarios: IN, OUT and HOUSEKEEPING Graphic integrity is always the main objective. Secondary objectives: IN: functionality OUT: portability and liability HOUSEKEEPING: address problems, boost productivity Workflow Do you expect updates? Will the updates be consistent? Who will maintain the project dataset? Scope Do you need to manipulate or just use the data (XREF, plot)? Why and when to clean up?
Scripting is fast and easy: Let’s try ! Tips: Force commands into command line mode by pre-pending “-” if necessary Record your conversation with AutoCAD Use text editor to edit and save with.SCR extension Warning: every space and empty line is interpreted as “ENTER” Automate common cleanup tasks
Your First Script
ScriptPro: batch processing of many files Download from Autodesk site 2007 and later- standalone 2006 and earlier –part of the Migration Tools Automate common cleanup tasks
SETBYLAYERMODE =101 TILEMODE 1 SETBYLAYER ALL Y Y TILEMODE 0 SETBYLAYER ALL Y Y QSAVE Blank Line Force Objects Properties ByLayer New for 2008: SETBYLAYER Use SETBYLAYERMODE to select which properties +32 ByBlock to ByLayer +64 Include objects in blocks ADD values to select several properties Default SETLAYERMODE=127 We will use SETLAYERMODE= =101 Note: there are two spaces between “ALL” and first “Y” and one space between first and second “Y”
Old border: CD_SHEET_E_VERT in paperspace, New border: BR08_4851.DWG Replace XREF with another XREF TILEMODE 0 -XREF D CD_SHEET_E_VERT -LAYER S G-XREF blank line -XREF O P:\4000\4851\DRAWINGS\REF\ARCH\BR DWG 0,0, XREF P "BR "..\..\REF\ARCH\BR DWG QSAVE blank line
STB-> CTB CONVERTPSTYLES QSAVE blank line CTB-> STB. First: CONVERTCTB ACAD.CTB to ACAD2.STB CONVERTPSTYLES ACAD2.STB QSAVE blank line CTB and STB
ATTMODE 1 ATTDIA 1 DIMASSOC 2 FILLETRAD 0 FILLMODE 1 MIRRTEXT 0 PDMODE 0 VISRETAIN 1 XEDIT 0 QSAVE blank line Set up Variables
(LOAD "C:\\_AU-CLEANUP\\LAYERFILTERDELETE.LSP") LFD QSAVE blank line Layerfilterdelete.lsp was downloaded from AcadX.com, Author: R. Robert Bell. (DEFUN C:LAYERFILTERSDELETE () (VL-LOAD-COM) (VL-CATCH-ALL-APPLY '(LAMBDA () (VLA- REMOVE (VLA-GETEXTENSIONDICTIONARY (VLA-GET-LAYERS (VLA-GET-ACTIVEDOCUMENT (VLAX-GET-ACAD-OBJECT)))) "ACAD_LAYERFILTERS"))) (PRINC "\NALL LAYER FILTERS HAVE BEEN DELETED.") (PRINC)) (DEFUN C:LFD () (C:LAYERFILTERSDELETE)) Run Lisp or VBA Macro
Fix Units Related Problems MEASUREINIT (0 English; 1 Metric) sets the initial drawing units as English or metric. MEASUREINIT controls which units, hatch pattern and linetype definition files a new drawing uses if not started from a particular template. MEASUREINIT is saved in the registry and the original value is determined by the geographic location of the installation. MEASUREMENT controls the same parameters but is stored in the drawing and always overrides the MEASUREINIT setting.
Fix Units Related Problems UNITS 2005 and earlier 2006 and later INSUNITS
Fix Units Related Problems
-UNITS N INSUNITS 1 MEASUREMENT 0 EXPERT 3 LINETYPE LOAD * ACAD.LIN blank line EXPERT 0 -PURGE LT *ISO* N QSAVE blank line Fix Units Related Problems
-LAYER UNLOCK * blank line TILEMODE 0 CHSPACE ALL blank line TILEMODE 1 BURST ALL blank line QSAVE blank line Optional: Use FLATTEN and OVERKILL (Express Tools) Make Your Drawings Less Intelligent
Back up your files or work on the copies. Use short scripts as “building blocks” for longer scripts. ScriptPro takes long time to open and close files. Check for the unexpected. Examine the log file after batch processing. Verify your old scripts if using with newer version of AutoCAD. Make sure that no one is working on any files you are processing. Scripting Tips
Page setups best practices: Speed up Publish: keep page setups stored in drawings to a minimum. Use DWGTrueConvert or DWGTrueView to clean up or update page setups. Use Publish to utilize page setups from donor drawings. Clean up plot and publish logs C:\Documents and Settings\%username%\Local Settings\Application Data\Autodesk\AutoCAD 2007\R17.0\enu\ PlotandPublishLog.CSV and hardcopy.log Print devices do not live forever Use eTransmit if you need to set plotters to None or scripts to set layouts to your plotting device. Plot and Publish issues
Special Layers: Layer 0 and Defpoints XREF-dependent Layer 0 and Defpoints layer fall flat onto corresponding layers of the parent file. Layer 0 should be used only for creating Block Definitions Defpoints layer is for AutoCAD use. Create a non-plot layer to hold your non-plot objects. Best Practice: Do not create any graphic content on either. Macro to move elements from Layer 0. Use in scripts. (defun c:from0 () (setq ssl0 (ssget "x" '((8. "0")))) (COMMAND "-layer" "N" "from0" "") (COMMAND "chprop" ssl0 "" "la" "from0" "") )
Sort the objects in the drawing into the correct layers. Tools : Layers II Layer Walk Qselect Layer Previous and Layer State Now available from the Dashboard Reminder: work on a copy or back up the original Layer Cleanup : Task 1 Right click
You need to show/plot XREFs with different symbology (color, lineweight and/or linetype) Things to consider: Are the element properties of XREF files set ByLayer? Use script. What is the VISRETAIN variable setting in the parent file? VISRETAIN variable controls whether the parent file “remembers” changes to XREF dependent layer properties between AutoCAD sessions. 1-Remember, 0-Forget. VISRETAIN is saved in the drawing, you can script it. Are the XREFs already attached? Do you expect the updates for XREFs? If yes, do you expect the layers to be consistent? Layer Cleanup : Task 2
Speed up repetitive tasks Problem: You are working on a hi-rise building (30 floors). Layer names are identical on every floor. File names contain a floor number (FILENAME- NN.dwg). You want to set layer state (properties, freeze and on/off ) on one floor, then apply it to other similar files on other floors. But XREFs for different floors have different names. Solution: Set up the layer state for the first floor. Save the layer state and export it to an external file Floor1.las. Open Floor1.las in any text editor and replace “-01” with “-02”, then save as Floor2.las. Now you can import and apply Floor2.las to the second floor. Layer Cleanup : Task 2
Change layer properties on multiple similar files without changing layer names. Fix one file manually, then save it as GOOD.DWS file Use Standards Checker (Tools->CAD Standards) to automatically fix other files to match GOOD.DWS Layer Cleanup : Task 3
Migrate files from one layer naming standard to another LAYTRANS (Tools->CAD Standards->Layer Translator) Tips: 1.Clean up Layer 0 and Defpoints layers first. 2.Zoom Extents before you start Layer Translator. 3.In Layer Translator: Map same first 4.In Settings check Show layer contents when selected. 5.Map layers which you can visually identify. Save the Layer Translation Mappings. Translate. 6.Use LAYWALK and other layer tools as described in Task 1 to clarify and sort out messed up layers, then go back to translation. Layer Cleanup : Task 4
Limitations of LAYTRANS: Works on one file at a time. Can’t batch. Nested objects in blocks are NOT forced to color and linetype ByLayer. Use SETBYLAYER in AutoCAD2008. Missing features: options to Force object Lineweight and Plotstyle to ByLayer. Can’t zoom in/out while in Layer Translator. Layer Descriptions will be lost in translation. Layer Cleanup : Task 4
If the LAYEREVAL ≠ 0 and value of LAYERNOTIFY is odd, you will get the dialog box that will require you to click Yes or No every time you plot or add a drawing to Publish. Use templates or use scripts. Viewport Layer Overrides Unreconciled new layers New in AutoCAD 2008 (Layers)
Potential problems: Special layers Changes in layer names Mind your Plot styles Using “Other Software” for batch processing of layers and other tasks. Layer Clean-up Tips
Attachments are babies – they follow their parents. XREFs 101: Attach vs. Overlay PLOT XREF1XREF2 XREF4XREF5XREF6 Overlays are teenagers – they never go with their parents. XREF3 Parents see and control their children Grandparents see only attachments
Full Path points to the exact location of a linked file. No path – no location is stored in the parent file. Relative Paths are point-to-point directions from the location of the parent file to the location of the linked file...\..\ref\arch\filename.dwg XREFs 101. Path: Full, Relative and No Path..\..\
Reference Manager: Runs outside of AutoCAD. Analyze and generate a report. Re-Link dataset Re-path dataset Tools for References delivered with AutoCAD
eTransmit: Runs from AutoCAD Package full dataset or subset Restructure unbroken links. Limited reporting Tools for References delivered with AutoCAD
LinkFixerPlus Can inoculate unbroken links so they can be cured automatically Best and unique feature: re-name and re-link. Huge time saver when file names have to change (phase, alternative) Sophisticated and configurable reporting. Third Party Tools for References
X-Filer Compact, hierarchical, color coded interface makes it easy to analyze and navigate large datasets Granular and sophisticated preferences. Configurable packaging options Third Party Tools for References
Tools for References: Feature Comparison
Scripts to clean up datasets. Best practices for page setups and Publish. Best practices and tools to clean up layers. Best practices and tools for organizing XREFs. We covered: Win-Win-Win Consistent data sets when shared by many parties multiply the overall savings. Design Team, Contractors and the Owner all benefit. Additional cleanup tools and methods will be posted at as they become available.
Evaluation forms Questions and Answers Thank you for your time !