Приложение "АВТОГРАФ" для автоматизации процесса формирования графического раздела архитектурно-строительной части проекта, страница 19

((and (= pfer 24) (= r 1)) "FBR-24")

((and (= pfer 18) (= r 1)) "FBR-18")

))

(command "вставь" ferma tvst mash mash (dtr 0))

(setvar "BLIPMODE" bm)

(setvar "CMDECHO" ce)

(princ)

);=========================КОНЕЦ=========================================

7.3.6 fonar.lsp

;=====================ФОНАРЬ СВЕТОАЭРАЦИОННЫЙ================

(defun C:ФОНАРЬ(/ tfer fonar mash tvst)

(setq ce (getvar "CMDECHO"))

(setq bm (getvar "BLIPMODE"))

(setvar "CMDECHO" 0)

(setvar "BLIPMODE" 0)

(defun dtr(a)

(* PI (/ a 180.0))

)

;========================Программа==========================

(command "слой" "С" "$POKR" "")

(initget "ПРодольный ПОперечный")

(setq traz(getkword"\nРазрез ПРодольный/ПОперечный:"))

(if (eq traz "ПР") (setq r 1))

(if (eq traz "ПО") (setq r 0))

(setq shir(getstring"\nШирина,м 6/12:"))

(setq mash(/ 100 (getvar "USERR5")))

(setq tvst(getpoint"\nТочка вставки:"))

(setq ferma(cond

((and (= shir 6) (= r 0)) "FAR-627")

((and (= shir 12) (= r 0)) "FAR-1227")

((= r 1) "FARR")

))

(command "вставь" fonar tvst mash mash (dtr 0))

(setvar "BLIPMODE" bm)

(setvar "CMDECHO" ce)

(princ)

);=========================КОНЕЦ=========================================

7.3.7 kol.lsp

;=====================Колонны АБК=========================

(defun C:КОЛ(/ str tvs rkol mas)

(setq ce (getvar "CMDECHO"))

(setq bm (getvar "BLIPMODE"))

(setvar "CMDECHO" 0)

(setvar "BLIPMODE" 0)

(defun dtr(a)

(* PI (/ a 180.0))

)

;=====================ПРОГРАММА=============================

(command "СЛОЙ" "С" "$BAZA" "")

(initget 7)

(setq st(getstring"\nСтроительство Старое/Новое:"))

(initget 7)

(setq rkol(getint"\nКолонна 400/300:"))

(setq kol(cond

((and (= rkol 300) (eq st "Н"))  "KN300")

((and (= rkol 300) (eq st "С")) "KS300")

((and (= rkol 400) (eq st "Н"))  "KN400")

((and (= rkol 400) (eq st "С")) "KS400")

))

(setq tvs(getpoint"\nТочка вставки:"))

(setq mas(/ 100 (getvar "USERR5")))

(command "Вставь" kol tvs mas mas (dtr 0))

(setvar "BLIPMODE" 0)

(setvar "BLIPMODE" bm)

(setvar "CMDECHO" ce)

(princ)

);===========================КОНЕЦ===============================

7.3.8 kran.lsp

;=====================КРАН МОСТОВОЙ========================

(defun C:КРАН(/ raz pkr gr kran mash tvs)

(setq ce (getvar "CMDECHO"))

(setq bm (getvar "BLIPMODE"))

(setvar "CMDECHO" 0)

(setvar "BLIPMODE" 0)

(defun dtr(a)

(* PI (/ a 180.0))

)

;========================Программа==========================

(command "слой" "С" "$BAZA" "")

(setq mash(/ 100 (getvar "USERR5")))

(initget 7)

(setq raz(getstring"\nРазрез/План:"))

(initget 7)

(setq pkr(getint"\nПролет крана,м 18/24:"))

(if (eq raz "Р")

(progn (initget 7)

(setq gp(getint"\nГрузоподьемность,т 10/20:"))))

(setq tvs(getpoint"\nТочка вставки:"))

(setq kran(cond

((and (eq raz "П") (= pkr 18)) "KMP18")

((and (eq raz "П") (= pkr 24)) "KMP24")

((and (eq raz "Р") (= pkr 18) (= gp 10)) "KMR1810")

((and (eq raz "Р") (= pkr 24) (= gp 10)) "KMR2410")

((and (eq raz "Р") (= pkr 18) (= gp 20)) "KMR1820")

((and (eq raz "Р") (= pkr 24) (= gp 20)) "KMR2420")

))

(command "вставь" kran tvs mash mash (dtr 0))

(setvar "BLIPMODE" bm)

(setvar "CMDECHO" ce)

(princ)

);==========================КОНЕЦ====================================

7.3.9 osi.lsp