Management

Hot Tip Harry

13 Mar, 2004 By: Bill Kramer

Cut and paste, a new chainlink fence, and more.


GET THE CODE
Download the code for this and all Cadalyst articles. Look for file mar04.exe in Get the Code.

Tips included in Hot Tip Harry are tested with AutoCAD 2002 and 2004, 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 downloaded or copied for commercial purposes. Tips are uploaded to the Get the Code area. Look for a file named mar04.exe. Downloads are free, but you need to register. Downloads are provided “as is” without warranty or support. All published tips are entered into the annual Hot Tip Harry Contest. From a pool of reader-selected monthly winners, our judges will pick the Top Tip for 2004. The first prize is $1,000. Second place wins $500, and third place, $250. E-mail those tips and tricks to harry@cadalyst.com.

THE COLD AIR IN THE OFFICE GOT a bit warmer when a package arrived from the tropics. Inside were pages of paper with text clipped from newspapers and magazines.

It seems that Harry found a new cut-and-paste toy. Ramesh Gopal's Tip #1931 includes a LISP function called (C:TBOX). The Tbox command draws a rectangle around text that you select in the drawing. This well- written routine demonstrates how easy it is to manipulate point data obtained from entity lists and the (textbox) subroutine of Visual LISP. I was pleased to note the use of (mapcar) skillfully intertwined in the code. Thumbs up!

The next set of routines were text cut-and-paste utilities from Len Nemirovsky. Tip #1932 houses a command function named (C:SWAP) that lets you swap the contents of one text object with the contents of another. Len's Swap utility makes manipulating tables and notes in drawings a lot easier. It also demonstrates how to manipulate text entity objects in Visual LISP. Load the LSP file and type Swap to activate.

Len's second contribution, BRG.LSP (Tip #1933), helps you place bearing and distance annotations in a drawing. Select a line object, and the macro prompts you to supply the points to attach a callout that shows the bearing and distance of the line you just selected. This is a dandy tool for surveyors and map designers. Len used the DIMSCALE factor to determine how large to make the text. Harry added a comment next to that in the code in case you want to change the value.

HATCH PATTERN ELEGANCE
There is something to be said for elegance, and Watson Kilbourne delivers. His pattern for chain-link fencing shows that even good things can be improved. Check out Tip #1934 and the simple five-line pattern he provided to draw a chain-link crosshatch. Simple, elegant, genius!


*CHAINLNX, Chain-link fencing
90,  .1,.3, .6,.4, .1,-1.1
90,  .2,.3, .6,.4, .1,-1.1
45,  .1,.4, -2.6870057685,.141421356, .70710678,-2.68700577
135, .2,.4,  2.6870057685,.141421356, .70710678,-2.68700577
This works best in an enclosed area. Download the tip and place the PAT file in your support path folder. Next use Bhatch and select the options for a custom pattern. Look for the chain-link fencing option in the custom patterns that are available.

VISUAL LISP FOR DIMENSIONS
Now for some sweet Visual LISP coding from Phil Tingley, along with a demonstration of how to manipulate the dimension object. Tip #1935 is designed to make it easier to manipulate the precision of a group of dimensions instead of changing the properties one at a time. A menu file and bit-maps for the icons are provided to simplify its operation, or you can simply load the LSP program file and run it from the keyboard by typing Dimdec.

Phil Tingley's second routine was originally included in the tip for dimension object manipulation, but I decided it was too good to be a tagalong. The Lineup command (Tip #1936) lets you define a line along which the text for the dimension objects is placed. Select the dimension objects, and they line up. Neatness counts for a lot.

Next, Ken Kaiser offers a document file that describes how to use the MNU system to create your own custom viewport-to-scale selections (Tip #1937). It includes complete instructions on how to add the custom menu to your existing menu. This is a useful example if you are just learning about menus and equally useful if you need a quick way to set viewport scales in paper space.

Tip #1938 includes two functions from Stacey Conrad that streamline scaling. The first sets the scaling factor with the (C:SSS) function, and the second runs the Scale command with the preset scale factor using the (C:SSC) function.

Until next time, keep on programming and sending those tips to Hot Tip Harry!


About the Author: Bill Kramer


AutoCAD Tips!

Lynn Allen

Autodesk Technical Evangelist Lynn Allen guides you through a different AutoCAD feature in every edition of her popular "Circles and Lines" tutorial series. For even more AutoCAD how-to, check out Lynn's quick tips in the Cadalyst Video Gallery. Subscribe to Cadalyst's Tips & Tricks Tuesdays free e-newsletter and we'll notify you every time a new video tip is available. All exclusively from Cadalyst!
Follow Lynn on Twitter Follow Lynn on Twitter


Latest News from Cadalyst Partners
Feed
My ConnectMyDNA Results   21 May, 2013

my unique gene...More>>Read more It's Alive in the Lab blog posts>>

Feed
TERA Semicon Drives Its Own Destiny with CAD and PDM   22 May, 2013

When you read the history of TERA Semicon, you can see right away that the company has had a strong vision and direction from Day 1. The South Korean...More>>Read more PTC Creo blog posts>>

Feed
Autodesk Revit Server 2014 - Now available for subscription customer download   20 May, 2013

Collaborate...coordinated... seamlessly... integrated...team...Wow...sounds awesome. Know anyone using...More>>Read more BIMbuilder blog posts>>

Feed
SolidWorks Simulation Tips: Parameters and Design Studies   22 May, 2013

In my opinion, one of the most underutilized tools in SolidWorks Simulation is the Design Study.  Design studies allow you to easily set up a...More>>Read more SolidWorks Blog posts>>

Feed
New Adventures in Cutting Tape: The Liquid Tape Cutter by Kouichi Okamoto   21 May, 2013

Invented just one year after the invention of Scotch tape in 1930, the tape dispenser is a unique package design-tool hybrid that can be found in...More>>Read more SolidSmack blog posts>>

Poll
What type of input device (besides the keyboard) do you use at your primary CAD workstation?
Standard mouse
Trackball mouse
Programmable mouse
3D navigation device
Pen/tablet
Multiple devices
Submit Vote




Considering Wide Format Printing Solutions?
Four FREE White Papers Available:






Subscribe Cadalyst Newsletters