Tips & Tools Weekly (Vol. 12, No. 42)
25 Nov, 2007This Week's Software Tips Be Among the First to Sport a New Cadalyst T-shirt Hatch Macro Use this macro to select objects to be hatched:
Use this macro for picking internal points:
Use this macro with rectangle and hatch combined:
NOTES FROM CADALYST TIP PATROL: Nice macros. A typical hatch in a tool palette hatches only an internal point. These macros could easily be modified to any hatch pattern, layer, scale, etc. We definitely recommend using these. Delete Filters NOTES FROM CADALYST TIP PATROL: You are correct! Plus, the Filters command is not only an Architectural Desktop command, it's an AutoCAD command. We can't find a listing for this command in AutoCAD 2008 Help, but it works in 2007 and 2008. It doesn't exist in AutoCAD 2004. When invoked, a dialog box opens with every layer filter listed. Select the layers you want to keep and click the Delete Filters button. The filters that are left in the right column are deleted. Customize Your Tool Palettes Tool palettes have been around since AutoCAD 2004, but the way they're set up has changed through the years. To add commands to a tool palette in AutoCAD 2007 and 2008, begin by opening the tool palette.
This brings up another window that lists every AutoCAD command. You can filter and sort this list by source (the CUI that the command is saved in). The commands are simply the buttons in a toolbar, menu, and palette. If you want any of these commands on your tool palette, select it, hold, and drag the command to your palette. If you want to make a new command in AutoCAD 2007, click the New button; in 2008 click the New icon (it looks like a star). Give it a name and define the macro. The macro is the series of instructions to AutoCAD that executes the command. Look at other commands (such as the three in the previous tip) to help you determine the proper format. You could even copy a command and edit it. Click OK when finished. Alternatively, if you have already drawn an object, hatch pattern, or other entity, select it in the drawing, hold, and drag it to the tool palette. Another way is to open Design Center (Tool / Palettes / Design Center, or press Ctrl+2). Browse to a file that has the information you want. Select the item, hold, and drag it to the tool palette. Note: The follow-up tips below have not been tested by the Cadalyst Tip Patrol. Follow-Up: Invisible Xrefs
Follow-Up: DWG Demon Exorcism Shawn Evjen sent in his Purge All routine. Shawn says, "It purges all standard purgeable items and returns a count of how many items were purged. Run the command by typing Pur, or set it to run within another command, such as Qsave, as I do. My Qsave command performs Zoom Extents, Audit, Purge All, and then a QSave at the end. I write my own code to keep file sizes down. I created this for use in AutoCAD 14, but currently use it with Architectural Desktop 3.3 and AutoCAD 2000."
Chris Wade found that problems still can arise when drawings are created in programs other than AutoCAD. Wade explains, "Although the code below assumes that you are already in model space and only need what is in model space, it's the most reliable way to eliminate these problems. This routine is designed to work in AutoCAD 2006 and newer. For older versions, remove Regapps and the remainder of the stuff from the Purge command."
Chris continues, "If you need both paper space and model space in the same drawing, then the following LISP routine cleans up the majority of the mess, but it does leave a bit of the problems; the one above is better if you only need model space. Please note that the routine below works only in AutoCAD 2006 and newer. It uses a command that is designed to explode all AEC objects, but has the nice side effect that it can help to clean up drawings made by programs other than Autodesk. This program does leave behind a file with the same name with -AECTemp added to it. Once you confirm that the new file looks correct, you can delete the one with the AECTemp extension. I also recommend using both routines on copies of the original file, just to be safe."
Similar to the exorcism routine, David Rodriguez came up with new toolbar button. David asks all the CAD folks to end their sessions with this tool. It zooms extents, audits the drawing, purges it, sets layer 0 to Current, and saves.
Follow-Up: Flag Those F Keys MicroStation Tip: MicroStation Trim Element Command
Submit your tip, code, or shortcut for your favorite CAD software. If we publish your tip, we'll send you a Cadalyst T-shirt, and each month Cadalyst editors will randomly select one published tip and send a $100 gift card to its author. Please submit only code and other tips that are your original work (or provide the original source so we can include proper credit) and tell us which software version you use. By submitting code, you grant Cadalyst the right to print and distribute your code in print, digitally, and by other means. Cadalyst and individual authors retain all rights to the code; published code is not to be used for commercial purposes.
| |
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Handbook for Manufacturing and Production IBM Opens PLM Centers of Excellence | |
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Back to Top | |
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Opportunities & Honors SIGGRAPH 2008 Call for Papers FIATECH Seeking Nominations for CETI Awards Glumac Receives Revit BIM Experience Award | |
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Design Visionaries NX 5 Training Guide Luxology Bundles modo 301 Evaluation Version with Video Training | |
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The Week's New CAD and Related Products Hardware: Connex500 3D Printer General Software: TurboCAD Mac v3 General Software: ePaper General Software: Scan2CAD v7.6 General Software: deskPDF Professional v2.5 Visualization: CINEMA 4D v10.5 AEC: ProjectWise Lifecycle Server v8.9.3 AEC: ArchT 2008 for AcceliCAD and IntelliCAD AEC: StormCAD v8 XM AEC: ArchT 2008 for AutoCAD 2008 MCAD: IRONCAD v10 MCAD: SEE Electrical Harness MCAD: Frame Generator Customization Tool MCAD: KeyCreator v7 CAE: PRELUDE v5 Inspect for CATIA V5 CAE: Abaqus Student Edition v6.7 CAE: STAR-CCM+ v2.10 CAE: ToleranceCalc v5 PLM: Teamcenter Express v3 | |
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Mark Your Calendar PTC High-Speed Machining Seminar "Discover Simulation" Information Seminar NIBS FEDCon NIBS FEDspec Meeting National buildingSMART Conference FIATECH's 2008 Annual Technology Conference For a complete list of CAD meetings, conferences, training sessions, and more, check out our calendar of events on Cadalyst.com. |