(setq oldortho (getvar "orthomode"))
(setq oldcanno (getvar "cannoscalevalue"))
I have a lisp routine for finding scale of a drawing. Search the cannoscalevalue to find drawing scale and do your required math from there.
Hope this helps.
Start with some of our most frequented solutions to get help installing your software.