Twist Lisp

Did you know you can precisely rotate the current view of modelspace?  This is a killer way to simplify drafting and dimensioning objects on an angle, especially if you have a way to align the current view to an object.  (And we do, keep reading.)

The longhand command is Dview > Dviewblock > Twist.  Enter the angle you want to twist the current view to, and you’re set.  Why type that out every time?  This lisp will do that and more – just type “TW” to invoke.

Download it here.

Command : TW

  • Enter the twist angle explicitly (e.g. 45 or -134.25) or…
  • Align: set twist angle by picking two points (Point 1 is 0,0 and Point 2 is positive x-axis vector)
  • Relative: set twist angle relative to current twist angle
  • After twisting the view, the list will prompt yes(default)/no to realign the UCS to the current angle.

Right now the script only does the twist in modelspace, I’m planning on expanding it to work in paperspace & viewports as well.  When I get some free time that is.

Until next time – keep it lazy.

Pianos & Steel. CAD Block Giveaway!

I just realized I never posted those grand piano cad blocks I promised months ago.  You can snag them here (version 2k).  Egg. face. mine.

While I’m at it – this is a link to some commonly used steel profile blocks.  Some of them are dynamic, so you’ll need a newer (2006? I’m too lazy to look it up right now) version of autocad to utilize them.  Inside you’ll find:

  • Common (small) rectangular tubing (d-d-d-d-dynamic!)
  • Angle Iron (dynamic)
  • 1 5/8″ Unistrut
  • 280 Track
  • Iron Pipe (dynamic)
  • 2×4 metal stud

Site Update

For the three people who keep up with this blog, you’ve probably noticed that I haven’t updated at all in the past several months.  Sorry about that – I’ve recently taken an engineering gig for Production Resource Group‘s scene shop, which includes confidentiality agreements and such.  At this point I’m not sure what is and isn’t considered a trade secret, so I’m holding off on posting any solutions derived from work.  Its a shame, I’ve always been of the mind that information should be free, especially in the theatre.  Ah the price we pay for growing up and moving on to bigger things.  This blog will continue, but it will probably shift even more to AutoCAD related scripts and such.  Now that I’m working at a different shop I’ve been drafting different stuff, and have a boatload of new ideas.  I’ve already started work on several routines; they’ll be up when they’re fit for public consumption.

Stagecraft Wiki Updates

Good news, I recently added some anti-spam measures to the Stagecraft Wiki, and as a result have re-enabled anonymous editing.  This means you don’t need to login to share your brilliant ideas!  (Hint, hint)

I’ve also added a few more pages.  Our upcoming show has a grand piano, so I’ve thrown some research up at piano dimensions.  I’ll add some cad blocks for the various sizes in a bit.

Also metal tube gauges, cord locks, arboron, and low tack adhesives.

Architectural Units in Excel

Here we give out excel formulas to do math with architectural measurements (e.g. 14′-3″).

I recently had to calculate the total area of our soft goods inventory.  With over 80 drapes, that’s a lot of number crunching.  Luckily our inventory is in an excel file, which includes the height and width of each drape.  Okay, make a formula to calculate the square area from those values… Problem: the measurements are given in feet and inches (e.g. 12′-1″).  Excel treats this as a string, hence it cannot use it to do math.  Solution: the following formula will strip out the excess characters and convert the measurement to inches — success!

Formula #1

Convert a 13′-10″ style format into inches.  (Replace instances of C3 with the cell containing the measurement to convert.)
=(LEFT(C3,(SEARCH("'",C3,1)-1))*12)+(SUBSTITUTE(SUBSTITUTE((RIGHT(C3,((SEARCH("-",C3,1)) -1))),"-",""),"""","")))

Formula #2

Calculate area from two cells (C3 & D3) from a [feet]’-[inches]” style format.  Returns area as square feet.

=(((LEFT(C3,(SEARCH("'",C3,1)-1))*12)+(SUBSTITUTE(SUBSTITUTE((RIGHT(C3,((SEARCH("-",C3,1)) -1))),"-",""),"""","")))*((LEFT(D3,(SEARCH("'",D3,1)-1))*12)+(SUBSTITUTE(SUBSTITUTE((RIGHT(D3,((SEARCH("-",D3,1)) -1))),"-",""),"""",""))))/144

The only requirement is that the format must be as follows: 5′-3″
These formulas rely on this format to find the numbers. Perhaps when I find more time, I’ll update them to work with a few different styles.

Layer State Switcher

This AutoCAD lisp command transparently saves the current layerstate.  Subsequent invocations switch between the saved state and the current state.  You can go back and forth until your eyes pop out.

Download and enjoy!

command: LSS
– on first run, it will save a layerstate and exit the command
– option: Previous – (default option), saves the current layerstate and switches you to the original saved layerstate.
– option: Update   – saves the current layerstate for future retrieval.
– option: Clear    – delete the auto-generated layerstates that this script creates.
– option: eXit     – duh.

kick it on CadKicks.com

Improved Layer Isolate

This Autocad lisp combines the layeriso & layeruniso commands into a single command.  Use once to invoke, use again to turn off.  You can use fade mode or off mode.

Download and enjoy!

command: LI – layer isolate with Fade Mode @ 60% (default)
command: LI` – (that’s a backtick, next to the 1 key) layer isolate in Off Mode

Littlest Track Dog – The Real Thing

These are the finished pictures from the tiny track dog project. (Man, that was a long time ago.)  And the results were: success!  They worked like a charm.  There was no cable slip, no binding in the track, and the travel noise was minimal.  We noticed that the UHMW bowed (approx 1/32″) at the bottom when the cable was tightened down, which was expected from such small bits of hardware.  Nick simply pre-tightened the cable, and carefully shaved the dogs on the tablesaw — done.

The track was shaped from composite lumber (Home Despot decking).  It ended up cheaper than the equivalent amount of UHMW, slicker (& quieter) than lumber and was less fiddly than strips of maso or arboron.  It was also much gentler on our blades & cut mucho quicker than UHMW would have.

aCAD: Text Override Tool Update

Download Text Override Tool v2.7 – while in AutoCAD type “TO” to run this routine.

I’ve recently updated my text override tool for AutoCAD.  In case you didn’t know, you can make the text field in a dimension read anything you want.  Ask some hardcore cad users about it, and your castle might be set upon by an angry mob.  Why do some drafters revile the text override?  Reason: lies, lies, and more damned lies.  If you can’t trust the dimensions in a drawing, what can you trust?  After years of misuse by impatient and/or lazy cad users the text overrides have developed a bad rap.  Here’s the truth, with great power comes great responsibility.  Take a gander at the screen shot below, and you’ll see what I mean.

Text Override in action!

Cool huh?  Note that none of the actual measurements were harmed in the picture above.  In the text overrides, “1 1/2″ O.C.” is actually “<> O.C.”  Autocad swaps out the <> with the measurement.  That’s some sweet stuff.

Normally to access the text override you have to plow through the properties palette and change it manually.  Pain in the ass.  I wrote this utility to simplify the process, & now you too can access the text overrides through a friendlier interface.  I built in my own frequently used text overrides (shortcuts, if you will).  I also included a few new features from the last go around.  If you open the file in a text editor, you can change the shortcuts to your liking.  Its as easy as changing a list.

Go forth and have fun!  And remember, if you use this for evil the CAD gnomes will sneak into your bedroom and smother you in your sleep.

Changes:

  • Code completely re-written from version 1.  Functions more like a lisp application and less like a script.  (Its also much prettier.)
  • Much more efficient and bomb proof.
  • Added options: literal and match.

Options:

  • L: Literal – not using a shortcut?  Use the L option & type spaces.  Requires a return/enter key to finish.
  • M: Match -make any dimension’s text override match (does groups too!)
  • blank line: Reset = Erase the dimension override.

Existing shortcuts: (<> = autocad’s measurement)

  • e.g. shortcut key = replacement text
  • C  =  <> O.C.
  • CT = <> O.C. TYP.
  • G = <> GAP
  • GT = <> GAP TYP.
  • T = <> TYP.
  • TH = <> THRU
  • NCT = <> [newline] O.C. TYP.
  • S = <> (SKIN)
  • P = (<>) [Parenthesis]

kick it on CadKicks.com