Look HasanCAD, my settings of AutoCAD active model space viewport measured on my monitor with real tape is 36 cm, and therefore I put that value into my code... This can be modified to suite any one's needs, as there are various types of monitors, and settings of AutoCAD may also vary... So consider to implement your standard into code measured with measurments that you use (mm) - someone maybe use inches, so he/she must measure width in inches and modify standard into the code... My code is made to consider all possible ratio proportions (100:1; 10:1, 2:1, 1:1, 1:2, 1:10, 1:100, 1:1000, ...) so when executing the code my set standard was as you wanted 1:100 (0.01), so be careful when entering ratios as screen representation of proportions for sure is dependable on what user enter...
Test my revised code for your needs and enter width of viewport in your measurment system (mm)... Representation on screen should meet required scale ratio that you enter... So 100 dwg=10 cm=0.1 m=100 mm => width in mm, 1:10 => 100 mm in real world will become 10 times smaller 10 mm = 1 cm...
This should be true on screen...
M.R.