How about a really simple one that should cause no problems....
Create an empy drawing with nothing in it.... no extra text styles, dimstyles, layers ... nothing .... set the block current layer to 0 (as should be the case for blocks anyway in most circumstances) save that drawing to the HD.....
In your routine ... insert this block on layer 0 with a scale of 1:1 at the point identified by BASE.
Scale the entire drawing as required, this block will also be scaled IF you select the entire database using (ssget "X")
Next time when the drawing is opened, have it check for the existence of that block, if it is there (and 12X scale) then the drawing is already scaled (by this proggie)
I suppose the pseudocode would be...
check for SCALEBLOCK
If SCALEBLOCK .... then
If SCALEBLOCK scale = 1 then
Scale the drawing
Else if SCALEBLOCK scale = 12 then
DO NOT scale the drawing
end second if
Else Insert SCALEBLOCK at BASE
Scale entire drawing as selected via (ssget "x") 12x