cadalyst
AutoCAD

Hot Tip Harry: Tips from Our Readers -- June 2006

8 Jun, 2006 By: Bill Kramer

Tipsters offer tools to set up a drawing and change an existing drawings settings to match preferences.


Great News for Harry Tipsters!Hot Tip Harry Challenge 2006, sponsored by Autodesk, just got better with even bigger prizes. You already know that the author of each published tip will receive a Cadalyst t-shirt, and the author of each month's best tip will receive $100 cash. Now, authors of all tips published in 2006 also will be entered into two year-end drawings. One lucky winner will receive a copy of AutoCAD 2007, courtesy of Autodesk, and a second winner will receive a trip to Autodesk University 2006 in Las Vegas, Nevada. For contest details and rules or to submit your tip, go to www.cadalyst.com/harry2006.

GET THE CODE
Download code for this and all articles. Look for JUN06.exe in Get the Code. Downloads are free and are provided "as is" without warranty or support.

Tips are tested using AutoCAD 2006, unless otherwise noted. By submitting code to Cadalyst, 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, and it is not to be used for commercial purposes.

Important note: Be sure your submission contains all elements required for it to run independently using AutoCAD 2006. Tips that are missing functions or other necessary elements will not be considered.

All published tips earn the author a Cadalyst
t-shirt, and the tip judged best each month earns the author $100. Click here for details about the Hot Tip Harry Challenge 2006.

E-mail those tips and tricks to harry@cadalyst.com.

Making AutoCAD drawings with your own preferences is important. The only problem is when you have to share drawings with others who have different preferences. This month, Harry's tipsters sent in a variety of different tools that allow you set up a drawing or change an existing drawing's settings to match your 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


More News and Resources from Cadalyst Partners

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!