# AutoLISP Layer Snippets

These are some of my frequently used AutoLISP snippets for layer management.  I’ve got a heap of these in a lisp file that I autoload into autocad at startup.  You can find the entire file here: layer-shortcuts.lsp.

If you look through that file, you’ll see that I have a common set of layers (for 2D and general work) that I include in every drawing file. The AutoLisp commands help to speed up my drafting with these common layers.

This is the syntax for each command:

Change to layer…

Move to layer…

Look like layer [transform]…

Reset object to default layer appearance…

copy to current layer…

# Mathjax test

This is a test of the new Mathjax plugin. Also, a quick little cheat sheet for right-angle trig identities; useful for calculating component forces of an angular force.

$$o = h \, \sin \, \theta = a \, \tan \, \theta$$

$$a = h \, \cos \, \theta = \frac {o}{\tan \, \theta}$$

$$h = \frac {o}{\sin \, \theta} = \frac {a} {\cos \, \theta}$$

New calculators:

Other notable changes:

• The Unit Conversion calculator now include electrical units
• Added to the Constants page.
• Added formula pages for each calculator (example)
• Added diagrams to those that need them
• Updated the jquery mobile library to 1.4.0.
• Most multi-page calculators were re-written to provide a simpler interface.
• Some calculators now utilize drop-down menus to specify which variable to calculate for

Coming soon:

• Parallel Key size and design calculator

If there is a calculator anyone wants to see, let me know. — cheers.

I’ve finished an ANSI Chain Calculator; you’ll find it in the main index.  It calculates the following:

• Physical properties of standard ANSI chains (multi-strands too),
• Pitch length to inch length converter
• Estimated chain elongation calculation
• Estimated chain weight per length of selected chain
• Center-to-center calculators for a two-sprocket system, calculating by sprocket centers or by chain length
• Sprocket properties for the selected chain size, including pitch diameter, outside diameter, and tooth width.

The Fleet Angle calculator now calculates by offset, angle, and distance.  Change any one variable and the other two update. I’ve also added a diagram.

The Frustum Flattener was updated, the new navigation bar wasn’t working correctly.

The Resultant Force calculator code was updated; it would sometimes fail to re-calculate when changed.

Note that I’ve moved the the diagrams.  They used to be located below the calculators (akk).  I’ve moved them into a pop-up dialogue that you can load by clicking the “Diagram” button, as shown below…

While I do work primarily in the entertainment industry, I like to keep an eye on the larger world of CAD news.  Here’s the current list of CAD related blogs I keep up with…

Design and Motion

SolidSmack – Product Design, CAD, Prototyping, etc.  Of EvD Media fame, highly recommend their podcast, Engineer Vs. Designer.  Oh, note to self, podcasts are a post for the future…

MasterGraphics blog – these guys have some good tips and tricks, found them while searching from info on Inventor tips.

Lazy Drafter

CAD Insider – This one goes way out of my discipline, but its still interesting to read up on general industry and CAD/CAM/CAE news

Autodesk Personnel

Ellen Finkelstein’s Blog – Usually more basic tips, but every once and a while there’s an obscure bit.

Heidi Hwewtt’s Blog – heidihewett.blogs.com

Between the Lines – from Shaan Hurley

Through the Interface – Coding (mostly in .net) for Autodesk products, from Kean Walmsley

# Update, and calculators

Yes, I’m still alive.  No, I haven’t posted in over a year.  Yes, I’m still working for a large live entertainment company.

A quick update, the earlier calculator scripts that I mentioned in the last few posts are no longer working.  I’ve instead been working on a unified collection of calculators using the jquery mobile framework; the aim is to be phone and tablet friendly.   Catch it in the links above, or here.

My two favorites are the Unit Converter and the HP/Force/Speed estimator.  I’ll be adding more as I find the time.

# Fluid Power Calculator

I’ve been playing around with learning javascript recently.  I’ve thrown together a fluid power calculator as a “hello world”.  You can find it here: Fluid Power Calculator It’s not pretty, but it works pretty well.  (See what I did there?)  You can download the page and run it locally if you want.

My ultimate goal is to transfer all of my theatre-related excel calculators to javascript powered web pages, so I can access them wherever I happen to be.

# Scratch! v. 1.2 released

Scratch – the scratchpad layer utility for AutoCAD – has been updated to version 1.2!

Hard to believe its been over a year since I released an update to Scratch.  This update is kind of a sea change for the program, see the notes below.  On another note, this is the last release I am going to issue; I use it every day, and it hasn’t been an active development project for a while.  I might post a short screencast describing how to use it.  I hope you get as much use out of it as I have.  And be forewarned, I’ve got some really cool stuff I’ve been working on.

Usage:

Note: the  symbol is a backtick (next to the 1 key)

• command:  – toggle between scratchpad layer and the current layer
• command: e – erase scratchpad (menu)
• option: a – erase everything in scratchpad layer
• option: p – preview all objects in scratchpad layer
• option: s – erase only selected objects in scratchpad layer
• command: m – move selected objects to the scratchpad layer
• command: 1 – jumps to previous layer

Release notes:

• consolidated scratch into one file
• changed CST command to
• changed EST command to e
• added options to the erase constructions (e) command
• added move object(s) to scratch layer command (x`)
• general bugfixes
• general performance refinements and code slimming