CADvocate
DECEMBER, 1996

Table Of Contents
Editorial
Our Next Meeting
Welcome New Members
President's Message
CAD Productivity - Layer Standards
Tips'n'Tricks - Defpoints Layer
Programming with AutoLISP
CAD Quiz

EDITORIAL
Hello, and welcome to the winter edition of the MUGONS Newsletter. This issue I've decided to keep the editorial brief and let our feature articles do most of the talking. Inside we have part 3 of our CAD Productivity series talking about layering standards and how important they are. Like last issue, this issue also provides another helpful, and useful, article on LISP programming for first time programmers which includes a nifty little routine that even experienced programmers may enjoy. Other features include our ever popular Tips'nTricks, CAD Quiz and President's Message. So sit back, relax, and enjoy what the MUGONS Newsletter has to offer. By the way, the offer sti ll stands for anyone who wishes to contribute to the Newsletter. Your article can be CAD or computer related, or even a cartoon or anecdote. You can either fax your article to one of the executive committee members (refer to the last page for phone and f ax numbers) or you can drop off your article at any of the meetings you attend.
OUR NEXT MEETING
Our next meeting will be on December 19, in the CAD Lab (Room 319) at the Nova Scotia Community College, Halifax Campus on Bell Road, at its usual time of 6:30 p.m. This is one meeting you don't want to miss because it is our annual Christmas Social for our paid members. For those planning to attend, please R.S.V.P. to Mary Hellstrom (429-5351) no later than December 16, so we can determine how much food and drink is needed. Also, paid members will be eligible for a very special door prize, a $50.00 Gift Certificate to East Side Mario's. Non members who wish to attend must R.S.V.P. and pay their membership dues. There will be good food and drink like previous ev ents so don't miss out
WELCOME NEW MEMBERS
We would like to welcome some new members to MUGONS. First, we'd like to welcome Patrick Kelly of Hawboldt Industries who is joining us for the first time. We also like to welcome Ken Fraser, who was a member a few years ago and is now returning to ou r group. Another person "returning" to MUGONS is Tony Beck, who attended meetings of the Cape Breton Chapter, but has since relocated to Halifax and is now working for Dalhousie. Finally, we would like to welcome corporate members, Morris and Richard Engineering Ltd. with a hello to Bruce McOrmond and Gene Violete. If you wish to join MUGONS, a regular membership is $35.00 per year ($15.00 for students). For $85.00, a corporate membership entitles all employees of a company to enjoy the benefits of MUGONS.
PRESIDENT'S MESSAGE- by Darrell MacDonald
As the Christmas season is now upon us and a new year approaches, we can look back on three very informative MUGONS sessions and ahead to more of the same. We've seen the latest in 3D visualization and animation, a powerful integrated Architectural softwa re package and we have also heard what's new and exciting from Autodesk. In the new year we on your executive committee will continue to present topics which help to broaden our knowledge of what's possible with the software and hardware we use every day. The focus is on variety. There is so much to be aware of and the pace of change is so rapid that we have found the MUGONS sessions and, most importantly, the people who are involved to be an incredible resource to draw upon. We are looking forward to the new year's sessions and hope that all of our members will join us for good cheer on the 19th at our annual Christmas social. If you can't make it, we sincerely wish you a happy and safe holiday season and hope to see you at our sessions in the new year
CAD PRODUCTIVITY - Layer Standards
AutoCAD layer standards seem to be a controversial topic in many offices. Either a layer standard has been put in place, and no one seems to follow it, or there is no standard at all, which causes more confusion. Often a company of a particular discipli ne will get an AutoCAD file from another company of another discipline where layer standards are not well defined. Or worse, they are defined but the CAD operator has a tendancy to put information on the wrong layer. This makes it very confusing for the sub-consultant who will spend more time correcting other peoples mistakes than working on the project. Layer standards are something that employers, and CAD operators, must take a long, hard, serious look at when it comes to CAD productivity. There ar e no "hard nosed" rules when it comes to layer naming conventions, but there are some general guidelines. The layer name should represent what kind of information is to be put on that layer. When relating to civil plan and profiles, or architectural floo r plans, it is pointless to give layer names like, "1,2,3.." or "A,B,C,...". One rule of thumb is to start each layer name by the type of discipline involved. For example, an Architectural drawing could start with the letter "A". Next would be the featur e type, such as WALL. Finally, the last part of the description could be whether the wall is Proposed or Existing. Therefore, you could have a layer name like, A-WALL-P. This layer name has three advantages. One: it's very self explanatory. Two: it's sho rt and to the point. Three: it's easy to remember. Another way to make sure that everyone understands what you are trying to accomplish is to provide a hard copy listing of all layers, which should list the layer name, color, linetype, and finally, a brie f description. This guide will help any sub-consultants that you may work with on a project. Finally, the most important aspect of establishing a layering standard is to make sure everyone (and this means everyone) follows it. As mentioned before, there is nothing worse than when a layering standard has been set into place and no one follows it. The CAD operator must realize that layers help keep information organized in a consistent and rational manner which in the end eliminates redundancy and possibl e loss of important information. If you would like to develop a layering standard but don't know where to begin, "The American Institute of Architects" (A.I.A.) has developed a set of layer guidelines for CAD users. It's very comprehensive and it covers every discipline from Architectural, to Civil, to Electrical, to name just a few. To obtain a copy of the guide, they can be reached at: (800) 365-2724
TIPS'n'TRICKS - Defpoints Layer
Did you ever notice that when using associative dimensions in AutoCAD, a layer called DEFPOINTS appears in your layer control settings? This layer is created automatically and stores the definition point information for associative dimensions. The intere sting thing is that any object created on layer DEFPOINTS will not plot even if the layer is turned on, and/or thawed. One idea is that any Engineer or Architect,who likes to check the drawing on the screen before plotting it, can use the DEFPOINTS layer as a "redline" layer to point out any changes to be made to the CAD operator. The DEFPOINTS layer can be created "on-the-fly" if no associative dimensions are present.
PROGRAMMING WITH AutoLISP
Last issue we talked about how important it was not to be afraid when it comes to writing (i.e., copying) your first LISP routine. Hopefully everyone who has never created a LISP routine before took the advice to drag out some old issues of CADalyst, or CADENCE, and tried to input what they saw from the printed page into an ASCII format text editor. There must have been numerous times where you have seen all of this weird looking code but never realized that you could benefit from it. If you still haven't found the opportunity to copy a lengthy LISP routine from CADalyst or CADENCE, try copying the short example below into an ASCII editor. The routine below is original, and has never been published before, to our knowledge, and we think it is a perfect example of how even a short routine can have a lot of power. As you can see, there isn't much cod e and copying it into an ASCII text editor should be rather quick. Basically, this routine will draw a line from the endpoint of an arc that will be tangent to another picked point (see diagram below). This routine comes in handy for CAD operators who d raw roads for civil design plans. Having said all that, load up a text editor, like Windows "notepad", or DOS' "edit" and start copying what you see below character for character. When you are finished typing, save it to the filename stated (TAN.lsp) in a directory where you keep all of your LISP routines.

(prompt "\nTAN.lsp loaded, enter TAN to execute: ") ;;this is the load message
(defun c:TAN (/ OS EN CEN P1 P2 ANG) ;;this is the command name and variables
(setvar "cmdecho" 0) ;;this prohibits all functions from being visible at the command prompt
(setq OS (getvar "osmode")) ;;saves current object snaps
(setq EN (entget (car (entsel "\nSelect an ARC: ")))) ;;lets you select an arc
(setq CEN (cdr (assoc 10 EN))) ;;determines the arc's centerpoint coordinates
(setvar "osmode" 1) ;;sets the endpoint object snap
(setq P1 (getpoint "\nSelect ENDPOINT of arc to draw from: ")) ;;lets you pick the endpoint of the arc
(setvar "osmode" 0) ;;turns off all osnaps
(setq ANG (angle CEN P1)) ;;gets the angle from the center to the selected endpoint
(setvar "snapang" ANG) ;;sets the snapang to the determined angle
(setvar "orthomode" 1) ;;turns on the orthomode
(setq P2 (getpoint P1 "\nPick SECOND point of arc tangent: ")) ;;pick the endpoint of the line to draw
(command ".line" P1 P2 "");;draws the tangent line from the endpoint to the second point picked
(setvar "osmode" OS) ;;sets back the old osnap setting
(setvar "snapang" 0) ;;returns snapang back to zero
(princ) ;;makes command line ready for future commands
) ;;end of routine.

One tip to keep in mind is that for every left parenthesis, there has to be a right parenthesis, and every pair of quotation marks needs a matching pair of quotation marks. If there is a parenthesis or quotation mark missing, the routine simply will not work, and you may get a message saying so (Error: malformed list). Please keep in mind that each time you correct any mistakes, the routine must be saved and re-loaded into your AutoCAD drawing session.


CAD QUIZ - Test Your Knowledge
1. Which command links entities together and defines them with a name?
a) HATCH
b) PLINE
c) BLOCK
d) NONE OF THE ABOVE

2. XREF is an abbreviation for:
a) eXisting REference Files
b) eXternal REFerence
c) eXtract RElocate Files
d) A and C

Answers 1C, 2B

Access to DALTECH Web Page
DALTECH
CAD/CAM CENTRE Courses
AutoLISP Programming - December 3, 4 & 5
AutoCAD Level 1 - December 10, 11, 12, 17& 18
Contact Clara Sarson @ (902) 420-7764 or FAX (902) 420-8380


[MUGONS Home Page|Newsletter Home Page]