Hot Tip Harry: Tips from Our Readers -- June 20068 Jun, 2006 By: Bill Kramer
Tipsters offer tools to set up a drawing and change an existing drawings settings to match preferences.
When you get a drawing from someone else, your first question likely is "What's inside?" Save Drawing Layer Data to a Spreadsheet (Tip #2118) comes from Leonid Nemirovsky. Load the LSP file and type ALIST at the Command line. A CSV (comma-delimited text) file sharing the same name as the drawing is created in the current folder. Double-click on the file name to view it in Excel or Notepad.
Object Property Layer Edits (Tip #2119) from Jay Thomas is an automatic tool to change objects to different layers. The resulting layer of an object is based on the type of object plus the use of custom linetypes. Inside the AutoLISP source code, Jay has set things up for his unique requirements. You'll need to edit the source code to match your own layer naming and color schemes. To run the program, load the LSP file and then type CLT at the Command line. The program then prompts for a selection set of the objects you want changed.
Layer Commands (Tip #2120) from Tony Torres demonstrates how you can use AutoLISP to automatically command sequences. Find the functions in the source file LST.LSP. You can easily modify the layer names and other layer properties to make you own quick draw layer utility library.
Object Snap Quickie (Tip #2121) from Bradley Branch is another example of AutoLISP and AutoCAD commands making life easier for CAD operators. After loading the LSP file, type SNP at the Command line to have the object snaps of choice (see source file) activated.
Roof Slope Axis Snap (Tip #2122) by E.J. Polley sets the current snap angle based on the slope of the roof you are working on. The slope information is input in imperial units as the rise per each horizontal twelve inches. For example, an entry of 4 would result in a roof sloping up (or down) four inches for every linear twelve inches. In drawing terms that equates to an angle computed by taking the arctangent of the riser value divided by twelve. Once loaded, type RS to set the roof slope snap angle. Type RS again to return the snap angle back to zero and repeat to set a different roof slope.
Rotating Annotation (Tip #2123) from William J. Townsend is a good example of a dimensioning utility. Load the LSP file into AutoCAD and type RT1 to add a rotational arrow and arc to an existing circle or arc object in your drawing. When RT1 starts it asks you select an arc or a circle. Next, it asks for the direction point (end of the arrow tip). This angle is where the annotation for the rotation starts. Next, specify where the annotation is to be drawn relative to the input object (inside or outside). The distance between the original object and the annotation is half the dimension text height. It then requests the extent of the rotation (full or partial) and the direction (clockwise or anticlockwise). An annotation based on the input parameters is then drawn on the Rotation layer. This routine is handy for anyone who needs to show the rotation of a shaft (represented by a circle) or some other mechanical device.
Edit Text (Tip #2124) is another utility included in this month's tips list from Leonid Nemirovsky. Put all the DCL files in a folder AutoCAD searches before loading and running the EDD utility command. When it runs, it asks you to select one or more lines of text (as many as five). The contents of the text objects then is displayed for editing. This function uses a simple approach to solve a common operator problem and is this month's top tip! Thanks and tip of the hat to Nemi!
Menu Load (Tip #2125) comes from Leonid as well. This simple function loads a partial menu into the default AutoCAD profile. It demonstrates how you can manipulate such objects inside Visual LISP and is intended for the Visual LISP student more than AutoCAD users.
Viewport Layouts (Tip #2126) from Phil Tingley is a time-saving tool for those who draw in model space and then need to create multiple views in layout space. This function streamlines a series of AutoCAD commands used to created view ports by jumping you from a layout tab into model space and back as needed. Phil included a lot of comments in his code for those who want to explore how he wrote the code.
Keep 'em Coming!
Keep those tips coming in, Harry reads them all. The stakes are high this year for the best of the best, and you don't want to save them for the last minute only to miss the editorial deadline. Also, please do not supply compiled code or other vendor utility functions. When sending in a tip, make sure you send the source code and include some comments about what it does. Thanks and a tip of the hat to this month's tipsters!
About the Author: Bill Kramer
For Mold Designers! Cadalyst has an area of our site focused on technologies and resources specific to the mold design professional. Sponsored by Siemens NX. Visit the Equipped Mold Designer here!
For Architects! Cadalyst has an area of our site focused on technologies and resources specific to the building design professional. Sponsored by HP. Visit the Equipped Architect here!