0 Members and 1 Guest are viewing this topic.
(defun varget () (setq lis '("orthomode")) ;define system variables (setq var (mapcar 'getvar lis)) (setq var1 '(1)) ;set system variables (setq no 0) (repeat (length lis) (setvar (nth no lis) (nth no var1)) (setq no (1+ no)) )(princ))(defun varset () ;reset system variables above to 0 (setq no 0) (repeat (length lis) (setvar (nth no lis) (nth no var)) (setq no (1+ no)) )(princ))(princ)(defun C:wire ()(progn(varget)(setq prevlayer (getvar "clayer"))(setq P (getstring "Audio(A)/Video(V)/Comm(CO)/Coax(R)/Control(C)/(N)etwork/(P)ower:"))(command "SNAP" "1")(IF (= P "V")(command "-LAYER" "M" "VIDEO" "C" "150" "" "" "PLINE" PAUSE))(IF (= P "A")(command "-LAYER" "M" "AUDIO" "C" "94" "" "" "PLINE" PAUSE))(IF (= P "CO")(command "-LAYER" "M" "COMM" "C" "206" "" "" "PLINE" PAUSE))(IF (= P "R")(command "-LAYER" "M" "COAX" "C" "44" "" "" "PLINE" PAUSE))(IF (= P "C")(command "-LAYER" "M" "CONTROL" "C" "10" "" "" "PLINE" PAUSE))(IF (= P "N")(command "-LAYER" "M" "NETWORK" "C" "210" "" "" "PLINE" PAUSE))(IF (= P "P")(command "-LAYER" "M" "POWER" "C" "7" "" "" "PLINE" PAUSE))(while (> (getvar "CMDACTIVE") 0) (command "\\"))(setvar "clayer" prevlayer)(varset)(princ));Progn );defun