(defun c:scc (/ ss pt1 pt2 dist size mat)
(setq ss (ssget))
(setq pt1 (getpoint "Point 1 :"))
(setq pt2 (getpoint "Point 2 :" pt1))
(setq dist (distance pt1 pt2))
;; Where is "mat' set ??
(cond ((eq "S1" mat) 200)
((eq "S2" mat) 400)
(t nil)
)
(progn (initget "S1 S2")
(setq size (getdist "\nSize scale: [S1/S2]"))
(command "scale" ss "" pt1 "R" dist size)
)
) ; <- you were missing this ??
(defun c:scc_fix (/ dist pt1 pt2 size ss)
(if
;; Check that selection AND pt1 AND pt2 are valid
(and (setq ss (ssget)) (setq pt1 (getpoint "Point 1 :")) (setq pt2 (getpoint "Point 2 :" pt1)))
(progn (setq dist (distance pt1 pt2))
(initget "S1 S2")
(setq size (getdist "\nSize scale: [S1/S2]"))
(command "scale"
ss
""
pt1
"R"
dist
(if (= "S1" size)
200
400
)
)
)
)
(princ)
)