Tipster Ed Galicki shares a command macro that he uses in AutoCAD Mechanical Desktop (AMD) that helps him calculate centering distances for stacked plates.
"I got tired of calculating how much to move something over to center one item on another. I usually use this tip in Mechanical Desktop when I put a plate (or something similar) on a second one. This gives the distance to constrain the edge away from the edge of the second part, without requiring annoying calculating.
I am a grouchy old codger and still use a tablet. This is a line of AutoLISP on my tablet:
(/ (-(GETDIST "BIG")(GETDIST "SMALL")) 2.0)
Notes from Cadalyst Tip Patrol: Although Ed uses this bit of code in AMD, it will work in AutoCAD and all of its verticals. Create a new command in the CUI (command user interface) using this bit of code. Then add that command to a toolbar, palette, ribbon, or even the quick-access toolbar. Draw your two shapes and start the command. Pick two points on the largest object in order to define its width. Then pick two points on the second, or smaller object, to define its width. The code subtracts the second distance from the first, then divides by two. The distance shown is how far you need to offset the second object to center it on the larger object.