I am training a new employee and I was demonstrating a lisp routine that goes and finds a layout tab from a template file an inserts it into the current drawing. It helps make plotting standard, and gives us consistent layout tab naming.
Now you can use Design Center to transfer a layout from one open drawing to another, but this lisp takes care of business without opening any other drawing. The secret is the use of a little known command "-layout". this command opens quite a few options for manipulating layouts. One of them is to insert from template. Then just supply the layout name required and Wa-Shaw! instant layout tab.
Combine that with a call to switch the current tab to the new tab, change to model space and zoom as needed, return to paper space, and then return the current tab to model space by setting "ctab" to "model". When complete the user will say "Gosh, that is the best thing since mobile apps!"
Thursday, October 20, 2011
Sunday, October 02, 2011
Dear Lazy Drafter #4 - Revenge by Hasselhoff

I often get asked for CAD advice and I might have an idea about what to do. Then again, I often have stupid ideas too. Oh well, if you are seeking CAD advice, and don't care who you get it from, drop me a line at lazydrafter@gmail.com. I'll do my best not to make you feel worse.
===========================================
===========================================
Dear Lazy Drafter,
Long story short, I have a classmate who crossed boundaries and lacks common decency. I've written a nice macro that I would like to share but don't know how to incorporate it into ACAD yet. The best thing I've heard people talk about redefining commands. Was thinking the "Plot" command would be perfect it's just the matter of HOW to do it. Most all of this is above my skill level right now. Any assistance would be appreciated.
Before you freak out, I've put in a few safety features where their previous work wont be touched. It HIDES previous work. Marks an UNDO
point. Creates a new layer, inserts a nice photo of David Hasselhoff with puppies. Locks that layer. Zoom Extents. and a random Hoff fanclub site opens in the browser.
^C^C^CUNDO;M;LOGFILEONE;(SETQ CL (GETVAR "CLAYER"));HIDEOBJECTS;ALL;;-LA;M;PLAYNICE;;-ATTACH;http://celebrityroast.com/wp-content/uploads/2011/01/david-hasselhoff.jpg;;32;0;LAYLCK;LAST;RIBBONCLOSE;ZOOM;E;-LA;S;!CL;;BROWSER;http://www.facebook.com/;BROWSER;http://www.davidhasselhoffonline.com/originalfanclub.html
Signed
Revenge by Hasselhoff
__________________________________________________________
Dear Revenge by Hasselhoff,
You are a genius. it doesn't matter if your classmate is up for an international humanitarian award, giving someone the "Hasselhoff" is too good to pass up. Here's how to do it. Instead of redefining a command like plot, just incorporate you macro into a lisp. (For more on Lisp see my post on Basic Lisp). This lisp can be placed into your classmate's startup suite. From there, use the aliasedit command to associate the lisp with a quick key-in like "L" which will normally start the line command.
If your target never uses any key-ins, you can use the Custom User Interface (CUI command) to change any thing on the ribbon to Revenge by Hasselhoff.
Subscribe to:
Posts (Atom)