Shelf Pin Holes
This is one of the most complex non-lisp macros I have written.
^C^C_UCS;NEW;\_setenv;pt1;0,0,0;_ID;\_setenv;pt2;$m=$(getvar,lastpoint);_CIRCLE;-1.37795,-3;.098425;-ARRAY;L;;R;"$m=$(FIX,$(+,$(/,$(-,$(*,$(INDEX,1,$(GETENV,PT2)),-1),6),1.2598),1))";2;-1.2598;-"$m=$(-,$(*,$(INDEX,0,$(GETENV,PT2)),-1),3.37795)";_UCS;W;
It draws shelf pin holes in section based on the 32mm cabinet system.
Catches, you have to click in the upper right hand corner first, and the lower left corner second.
Also that cabinet must be open to the right, not the left.
This uses some tricks to fool LT into saving some entered coordinates and may be useful to folks (setting lastpoint as one and setting a new ucs around another). Good luck deciphering the rest. I wrote the darn thing and it would take me a long time to figure out the math and order of operation.
Warning, do not play with the quotes, if you do you mess up the order in which diesel parses the command. Quotes are used in diesel to delay portions of the code from being processed until the next time the interpeter fires. Quotes are probably the hardest part of diesel to understand, but the one thing that can make it very useful if you have no other programming options.