MUGONS LOGO
CADvocate
August, 1997


Table Of Contents
Editorial
Our Next Meeting
Congratulations
AutoCAD R14 Is Here!
AutoCAD Q&A
CAD Productivity - Creating hatch Patterns
Tips'n'Tricks - Making a Text Style Current Quikly!
Programming with AutoLISP - Using FINDFILE To Insert Blocks
CAD Quiz

EDITORIAL
Hello, and welcome to the Summer issue of the MUGONS Newsletter. Another successful season has come and gone for MUGONS. Even though the general meetings are on hiatus for the season, the Newsletter will continue to be published so members can still get u seful information on their favourite CAD package. Looking back on the past season, the Newsletter has grown quite a bit. Our Productivity series, which was only to be in five parts, has become a regular feature with topics like layer management and est ablishing a block library. There is an ongoing tutorial on AutoLISP programming which contain clear examples that can be used for everyday use. And of course, the ever popular Tips'n'Tricks section always has a constant presence in this Newsletter. Eve n the overall look of the Newsletter has changed. With so much useful information, how can we make this Newsletter even better? How about a new ongoing feature? Starting this issue, the CADvocate has a new column called, "Ask the CAD Man" where MUGONS members get solutions to problems they may have. It's like "Dear Abby" for CAD users. If you have any questions to be answered, feel free to present them at any general meeting, or fax them to any committee member listed on the back page.
OUR NEXT MEETING
Our next meeting won't be held until sometime in September of 1997. There are details still to be ironed out, but there is a chance the MUGONS home base will be relocated from the Nova Scotia Community College (N.S.C.C.) Halifax Campus, on Bell Road, to N .S.C.C. - Institue of Technology Campus (formerly N.S.I.T.) on Leeds St. in Halifax. Once again, this is only speculation at this point, but we will keep everyone informed as to what will happen in the new season.
CONGRATULATIONS
Congratulations are in order for first time MUGONS member, Patrick Kelly, of Hawboldt Industries, who won a free upgrade of AutoCAD R14 for his office at AutoDESK's "Design Your World" seminar which was held on May 8. (Do you think Patrick is going to as k for a raise?) The upgrade was courtesy of Autodesk and Keltic CAD Solutions
AutoCAD Release 14
If you attended Autodesk's "Design Your World" seminar this past May, you probably had a chance to play with AutoCAD R14. Even though some people are toting it as "R13_c5", the speed and performance enhancements alone justify a new name and release (not t o mention that Autodesk has to recover lost revenue in research and development). Not only is the speed impressive, but there are some handy tools: transparent zooms and pans in paperspace; magnetic object snaps; and solid fill hatching which is a dream c ome true. One of my favourite features is the xref clipping feature. Basically, you can attach a large xref into a drawing and literally clip only the information you need. I discovered that if you bind the xref, everything stays the same, but if you ex plode the bound xref, everything comes back. Will people rush out and get R14? Probably not at first due to the magnitude of problems users had put up with in R13 which will make people be a little cautious about buying R14. But there is a very good chance that people will upgrade just for the enchanced speed and file size reduction features alone.
AutoCAD Q&A
Question: We received an AutoCAD file from one of our Sub-Consultants which has well over three-hundred layers (348 to be exact) and none of them are listed in alphabetical order. What's going on?

Answer: A system variable called "MAXSORT" sets the maximum number of symbol names (or filenames) to be sorted by listing commands. The default setting is 200, and since there are 348 layers present in the drawing in question, they end up being listed in th e order in which they were created. Simply set MAXSORT to a value the same as the number of layers (or more) and all the layers will be displayed alphabetically.

Question: After setting all dimvars in a drawing to conform to our company drafting standards, I noticed the dimension text is quite small compared to other text. I am sure I set the DIMTXT and DIMSCALE values accordingly, but the dimension text is still out of proportion. How can I correct this?

Answer: Chances are that a system variable called DIMTXSTY (i.e., DIMension TeXt STYle) is set to a text style that has a fixed height. No matter what Dimvar you set, the dimtext will always appear at that preset height. You can do one of two things, eithe r invoke the STYLE command and change the height of that particular style to a value of 0 (zero), or, create a whole new style [name] with a height of zero just for your dimensions so that you don't affect other text entities within the drawing


CAD PRODUCTIVITY - Creating hatch Patterns
Understanding how a hatch pattern is created is easy. Perfecting a hatch pattern can be a tedious, time consuming, trial and error process. But don't let that stop you from trying to create one. A hatch pattern can be as simple as one line of code, or complex as one hundred lines of code. Either way, a custom made hatch pattern can improve the look of your drawing and help you be more productive. Step 1 is to understand how a hatch pattern works. Take a look at the example below.
*DASHED, dashed lines
0, 0,0, 0,0.5, 0.5,-0.25

The first line states the name of the pattern (*DASHED,) followed by a brief description (dashed lines) The next line is the actual code of how the pattern is drawn. The first number (0,) tells AutoCAD what angle to draw the line at; the second group of numbers (0,0,) is the X & Y origin point of the line; the third set of numbers (0,0.5) tells AutoCAD to draw the same line parallel to the first with an X offset of 0, and a Y offset of 0.5. The fourth and final set of numbers (0.5,-0.25) draws each line 0.5 unit long, then a "minus" sign that precedes the number -0.25 "draws" a gap (you can also use the number zero to draw a "dot" within your hatch pattern). After AutoCAD reads the code, it generates a hatch pattern as seen in Figure 1.


Even though there are only two numbers present in the code to draw a line, AutoCAD will continue repeat the line over and over again until it reaches the hatch boundary. If you wish to see examples of a more complex hatch patterns, simply open the ACAD.pat file and you will see the code for all of AutoCAD's hatch patterns. As stated before, some are very simple while others are incredibly complex. However, it is possible to create simple and effective hatch patterns which will help you in your everyday work. For example, if you use AutoCAD to create Architectural floor plans, you can create a hatch pattern to generate a ceiling grid so that each panel is 24x48 inches in size which eliminates having to use construction lines. Here's the code:

*CEILING, 24x48 ceiling grid
0, 0,0, 0,24
90, 0,0, 48,0

You should note there are some factors you should be aware of when creating hatch patterns:
*You can add your own hatch patterns to the ACAD.pat file, however, it's easy to corrupt the file so making a backup is strongly reccomended.
*It is also recommended that you create separate *.pat files and use them when needed.
*If you do create your own *.pat file (and you will) make sure the pattern name and file name are the same and placed in the same directory as ACAD.pat.
*Round elements such as arcs and circles cannot be specified in a hatch pattern, only straight lines and dots.
Happy hatching
TIPS'n'TRICKS - Making a Text Style Current Quikly!
Most AutoCAD users have many text styles defined in their drawing. A lot of us use the STYLE command to make a particular style name current (i.e. "Style" "Enter style name" "Select Font File" etc. etc. etc.) You can actually make a text style current wi th just a few toolbar or menu clicks. First, click on the "Object Creation" button, then click on the "Text Style" button, in which a menu listing of all the defined styles will appear, and then just simply click on the style name you want current. You a lso get a graphical representation in case you forget what a particular style looks like (see Figure 1)


Another way to access this dialog box is to click on the DATA pull-down menu, and select "Object Creation". You'll be surprised how much time you save by using one of these methods.
PROGRAMMING WITH AutoLISP- Using FINDFILE To Insert Blocks
AutoLISP has only one file management function called FINDFILE. It searches AutoCAD's library path, or specified directory paths, to find particular files. This function is great for routines that help automate time consuming procedures like inser ting blocks. You can create a LISP routine to insert a specific block into your drawing with minimal input. Let's say you need a north arrow inserted to the scale of the drawing (e.g. 1:500) positioned accordingly, and rotated at zero degrees. You can u se the block command, but it is more efficient to cut out the many steps it takes simply by using a productive routine. Below is a routine which helps you do this with an explanation of each line of code. Simply enter the command name, which represents t he name of the block, and pick a point on the drawing. The routine will do everything else.

(defun c:NORTH (/ BL SCALE) ;defined function & variables with NORTH as command
(setvar "attreq" 0) ;turns off ATTribute REQuests
(setq SCALE (getvar "dimscale")) ;gets value of dimscale to be used as scale factor
(setq BL (findfile "C:/DRAFTING/SYMBOLS/NORTH.dwg"));directory search for block called NORTH
(command ".insert" BL pause SCALE "" "") ;insert command initiated with minimal user input
(setvar "attreq" 1) ;turns on ATTribute REQuests
(princ) ;clean-up command prompt display
);end of routine

You should note that the FINDFILE function must use forward slashes during the path search (i.e. c:/DRAFTING/ etc..). If you use backslashes like you normally would, the routine won't work properly. You can copy this routine any number of times an d modify it for different blocks, like title-sheets, placed within a single ASCII LISP file. Enjoy!
CAD QUIZ - Test Your Knowledge
1. In Paperspace, the expression XP means:
a) EXACT PRECISION
b) TIMES PAPERSPACE
c) NONE OF THE ABOVE
d) ALL OF THE ABOVE

2. The abbreviation UCS stands for:
a) USER COORDINATE SURVEYING
b) UTILITY COORDINATE SYSTEM
c) USER COORDINATE SYSTEM
d) NONE OF THE ABOVE

Answers: 1B, 2C

THIS JUST IN! - CADalyst publishes MUGONS Member!
MUGONS member, Murray Clack, discovered recently that an article he submitted to CADalyst magazine entitled, "How I learned AutoCAD" has been published on one of their Web Pages. The October '96 issue asked readers to submit their articles to the now defunct column "Soapbox". This is the third time CADalyst has published something s ubmitted by Murray.
Access to DALTECH Web Page
DALTECH
CAD/CAM CENTRE Courses
Contact Clara Sarson @ (902) 420-7764 or FAX (902) 420-8380

[MUGONS Home Page|Newsletter Home Page]