I thought: get smart-someone else must have done a lisp for this.
But no. At least as far as I looked- which was not all that far.
There was one found but it did not perform the way I wanted, so
I decided to write my own. Needless to say it appears to have
taken a day and half out of my life.
It occurs to me now, that my time would probably have been
spent better watching TV or taking Rose for a walk.
Anyway, it was a vague sort of challenge, and it is finished now.
One of it's features is that it does produce 3D solids when it
has finished. It also flies in the face of "traditional" methods
of spacing of bolts. Normally in the old days a draftee would
work out the bolt centres (theoretical) then choose the nearest
value to make the centres. For instance, he might have calculated
137.5mm as the hole centres. To make the drawing not have the
dreaded 0.5 or the "hard to read" 137, he would have said
nearest is 140mm. Then the dimension between the end hole
and the next one in might have ended up at say 122mm.
I have suddenly had an epiphany: all the flanges I have been
drawing lately have been laser cut. So who cares if the hole
centres are 137.5mm? Not me. Especially when it
made this routine a lot easier to write. No doubt the
traditionalists out there will be pouncing on me for being
Here is the dialog box - where you fill in all the variables.
It does make the layers "Front Flange", "Back Flange"
and"Gasket", otherwise it does not appear to do anything
drastic to your drawing. I have made it so that it can be used
in an existing drawing-ie you don't have to run it in a new drawing.
I have had the odd situation (which I could not make it repeat)
where it seemed to lose the plot and put the holes in the
wrong place-almost as it the snapmode had gone nuts.
a strange one, considering the whole thing just uses
standard commands and hopefully does not reuse Autocad's
reserved commands like angle and so on.
An extension I did consider was to insert bolts/nuts and washers.