Hi Guys,
I am writing a program for adding scale lists in AutoCAD 2010.
This is where I am;
(defun AddMetersScales() (command "-SCALELISTEDIT" "ADD" "1:5000 (Meters)" "0.2:1" "Exit")(command "-SCALELISTEDIT" "ADD" "1:3000 (Meters)" "0.3333:1" "EXIT")(command "-SCALELISTEDIT" "ADD" "1:2000 (Meters)" "0.5:1" "EXIT")(command "-SCALELISTEDIT" "ADD" "1:1000 (Meters)" "1:1" "EXIT")(command "-SCALELISTEDIT" "ADD" "1:500 (Meters)" "2:1 " "EXIT")(command "-SCALELISTEDIT" "ADD" "1:400 (Meters)" "2.5:1" "EXIT")(command "-SCALELISTEDIT" "ADD" "1:300 (Meters)" "3.333:1" "EXIT")(command "-SCALELISTEDIT" "ADD" "1:250 (Meters)" "4:1" "EXIT")(command "-SCALELISTEDIT" "ADD" "1:200 (Meters)" "5:1" "EXIT")(command "-SCALELISTEDIT" "ADD" "1:150 (Meters)" "6.6666:1" "EXIT")(command "-SCALELISTEDIT" "ADD" "1:100 (Meters)" "10:1" "EXIT")(command "-SCALELISTEDIT" "ADD" "1:50 (Meters)" "20:1" "EXIT")(command "-SCALELISTEDIT" "ADD" "1:25 (Meters)" "40:1" "EXIT")(command "-SCALELISTEDIT" "ADD" "1:20 (Meters)" "50:1" "EXIT")(command "-SCALELISTEDIT" "ADD" "1:5 (Meters)" "200:1" "EXIT"))
Problem is that, if a drawing already has a scale in the above list, it brakes the loop and shows error.
How to handle this? I just want to skip adding that scale if the error happens...
Please help...