> 1 <

Автор Сообщение

user1140

Members


Статус

1 сообщений

Где: Russia
Род занятий:
Возраст:

#7200   2013-12-02 18:14 GMT+3 часа(ов)      
Здравствуйте, дорогие профессионалы. Есть вот такой lisp написанный под 2005 кад, точнее это только лисп запуска. Но выдаёт ошибку "; ошибка: неверный тип аргумента: fixnump: nil"
Я только начинающий лиспер и по-этому прошу вашей помощи! У меня кад 2013 рус.
(defun c:gen_menu ()
(setq fff_0 (strcat dir "most\") dir_ris (strcat fff_0 "risun\"))
(setq fff_1 (strcat fff_0 "objekts.lst"))
(setvar "dimzin" 0) (setvar "osmode" 0) (vl-load-com)
(setq exit_obj nil nom_obj 0)
(while (= exit_obj nil)
(if (= dopusk T) (catal_obj) (setq exit_obj T));end if
);end while
);end defun gen_menu
 
(defun catal_obj ()
(setq w_o 1 work_obj T key_obj 0 list_obj (list ""))
(setq fd (open fff_1 "r"))
(if (/= fd nil) (progn (while (setq line (read-line fd))
(setq list_obj (cons line list_obj))
);end while
(close fd)));end progn if
(setq list_obj (cdr (reverse list_obj)))
(if (< (setq dcl_id (load_dialog "gen_menu.dcl")) 0) (exit))
(if (not (new_dialog "menu_1" dcl_id)) (exit))
(if (/= list_obj nil) (progn (setq col_el (length list_obj) nom_el 0)
(start_list "curent_obj")
(repeat col_el (setq line (nth nom_el list_obj))
(add_list line)
(setq nom_el (+ nom_el 1)));end repeat
(end_list) (cur_nom_name)
(SET_TILE "curent_obj" (rtos nom_obj 2 0))
);end progn
(progn (mode_tile "cur_name_obj" 1) (mode_tile "group" 1)
(mode_tile "del_obj" 1) (mode_tile "edit_obj" 1)
(mode_tile "work_obj" 1) (mode_tile "add_obj" 0)
));end progn if
 
(action_tile "curent_obj" "(setq nom_obj (atoi $value))(cur_nom_name)")
(action_tile "add_obj" "(setq key_obj 1)(done_dialog 0)")
(action_tile "del_obj" "(setq key_obj 2)(done_dialog 0)")
(action_tile "edit_obj" "(setq key_obj 3)(done_dialog 0)")
(action_tile "plot_obj" "(setq key_obj 4)(done_dialog 0)")
(action_tile "exit_obj" "(setq exit_obj T)(done_dialog 0)")
(action_tile "work_obj" "(setq w_o (* w_o -1))(f_work_obj)")
(start_dialog)
(if (= key_obj 1) (add_obj));end if
(if (= key_obj 2) (del_obj));end if
(if (= key_obj 3) (edit_obj));end if
(if (= key_obj 4) (plot_chert));end if
);end defun catal_obj
 
(defun f_work_obj ()
(if (= w_o -1)(setq work_obj nil)(setq work_obj T))
(if (= work_obj T) (progn
(mode_tile "cur_name_obj" 0) (mode_tile "group" 0)
(mode_tile "edit_obj" 0)) ;end progn
(progn (mode_tile "cur_name_obj" 1)
(mode_tile "group" 1) (mode_tile "edit_obj" 1))) ;end progn if
);end defun f_work_obj
 
(defun cur_nom_name ()
(setq line (nth nom_obj list_obj)) (SET_TILE "cur_name_obj" line)
(setq shifr_obj (init_shifr (substr line 1 6)))
(setq cur_dir (strcat fff_0 shifr_obj))
);end defun cur_nom_name
 
(defun add_obj ()
(setq shifr_obj "" name_obj "")
(if (< (setq dcl_id (load_dialog "gen_menu.dcl")) 0) (exit))
(if (not (new_dialog "menu_add_obj" dcl_id)) (exit))
(action_tile "add_shifr_obj" "(setq shifr_obj (init_shifr $value))")
(action_tile "add_name_obj" "(setq name_obj $value)")
(action_tile "add_obj_list" "(check_shifr)")
(action_tile "stop_add" "(setq err_shifr T)(done_dialog 0)")
(start_dialog)
(if (= err_shifr nil) (progn
(setq fff_d (strcat fff_0 shifr_obj)) (vl-mkdir fff_d)
(setq fd (open fff_1 "w") nom_el 0)
(setq line (strcat line " - " name_obj)) (write-line line fd)
(repeat col_el (setq line (nth nom_el list_obj))
(write-line line fd) (setq nom_el (+ nom_el 1)));end repeat
(close fd) (setq nom_obj 0)
));end progn if
);end defun add_obj
 
(defun check_shifr ()
(setq err_shifr nil)
(if (= shifr_obj "") (progn (setq err_shifr T)
(alert "Введите шифр объекта!"));end progn
(progn (if (/= list_obj nil) (progn (setq col_el (length list_obj) nom_el 0)
(repeat col_el (setq line (nth nom_el list_obj))
(setq line_obj (init_shifr (substr line 1 6)))
(if (= shifr_obj line_obj) (setq err_shifr T));end if
(setq nom_el (+ nom_el 1)));end repeat
));end progn if
(if (= err_shifr nil) (progn (done_dialog 0)
(setq n_pr (- 6 (strlen shifr_obj)) line shifr_obj)
(repeat n_pr (setq line (strcat line " ")));end repeat
);progn
(alert "Обьект с таким шифpом уже существует!"));end if
));end progn if
);end defun check_shifr
 
(defun init_shifr (shifr)
(setq col_sim (strlen shifr) n_sim 1 shifr1 "")
(repeat col_sim (setq sim (substr shifr n_sim 1))
(if (= sim "/") (setq sim "-"));end if
(if (/= sim " ") (setq shifr1 (strcat shifr1 sim)));end if
(setq n_sim (+ n_sim 1)));end repeat
(setq shifr shifr1)
);end defun init_shifr
 
(defun del_obj ()
(setq dialog_ok nil)
(if (< (setq dcl_id (load_dialog "gen_menu.dcl")) 0) (exit))
(if (not (new_dialog "menu_del_obj" dcl_id)) (exit))
(SET_TILE "del_msg" line)
(action_tile "accept" "(done_dialog 0) (setq dialog_ok T)")
(action_tile "cancel" "(done_dialog 0)")
(start_dialog)
(if (= dialog_ok T) (progn
(setq fd (open fff_1 "w") nom_el 0)
(repeat col_el (setq line (nth nom_el list_obj))
(if (/= nom_obj nom_el) (write-line line fd))
(setq nom_el (+ nom_el 1)));end repeat
(close fd)
(if (> nom_obj 0) (setq nom_obj (- nom_obj 1)))
));end progn if
);end defun del_obj
 
(defun edit_obj ()
(setq exit_edit nil cur_tri 1)
(while (= exit_edit nil) (vybor_kon));end while
);end defun edit_obj
 
(defun vybor_kon ()
(if (< (setq dcl_id (load_dialog "gen_menu.dcl")) 0) (exit))
(if (not (new_dialog "dlg_1" dcl_id)) (exit))
(if (= cur_tri 1) (SET_TILE "key_ob_vvod" "1"));end if
(if (= cur_tri 2) (SET_TILE "key_zemlya" "1"));end if
(if (= cur_tri 3) (SET_TILE "key_opora" "1"));end if
(if (= cur_tri 4) (SET_TILE "key_prolet" "1"));end if
(if (= cur_tri 5) (SET_TILE "key_regul" "1"));end if
(if (= cur_tri 6) (SET_TILE "key_sopr" "1"));end if
(if (= cur_tri 7) (SET_TILE "key_podh" "1"));end if
(if (= cur_tri 8) (SET_TILE "key_stam" "1"));end if
(if (= cur_tri 9) (SET_TILE "key_plan" "1"));end if
 
(action_tile "key_ob_vvod" "(setq cur_tri 1)")
(action_tile "key_zemlya" "(setq cur_tri 2)")
(action_tile "key_opora" "(setq cur_tri 3)")
(action_tile "key_prolet" "(setq cur_tri 4)")
(action_tile "key_regul" "(setq cur_tri 5)")
(action_tile "key_sopr" "(setq cur_tri 6)")
(action_tile "key_podh" "(setq cur_tri 7)")
(action_tile "key_stam" "(setq cur_tri 8)")
(action_tile "key_plan" "(setq cur_tri 9)")
(action_tile "edit_data" "(done_dialog 0)")
(action_tile "exit_data" "(setq cur_tri 0 exit_edit T)(done_dialog 0)")
(start_dialog)
(if (= cur_tri 1) (progn (load "ob_data") (ob_data)))
(if (= cur_tri 2) (progn (load "zem") (zem_data)))
(if (= cur_tri 3) (progn (load "opora") (op_menu)))
(if (= cur_tri 4) (progn (load "prolet") (prolet_data)))
(if (= cur_tri 5) (progn (load "regul") (reg_dat)))
(if (= cur_tri 6) (progn (load "soprmsn") (sopr_dat)))
(if (= cur_tri 7) (progn (load "podhod") (podh_dat)))
(if (= cur_tri 8) (stam_dat))
(if (= cur_tri 9) (progn (load "planv") (plan_dat)))
);end defun vybor_kon
 
(defun stam_dat ()
(setq dialog_ok nil)
(if (< (setq dcl_id (load_dialog "gen_menu.dcl")) 0) (exit))
(if (not (new_dialog "stamp_1" dcl_id)) (exit))
(setq fd (open (strcat cur_dir "/stamp.dat") "r"))
(if (= fd nil) (progn
(setq name_1 "Мостовой пеpеход чеpез pеку Манома")
(setq name_2 "на автомобильной доpоге 'Лидога - Ванино'")
(setq nach "Пискоpская" glte "Баpинов" gip "Пpоскуpяков" nknt "Алексеев")
(setq nkomp "Мост чеpез p.Манома" nagru "A11, HК-80" shifr "2222-1-КЖ")
(setq marm1 "Ст5сп" marm2 "10ГТ" marm3 "25Г2С" mst "16Д")
(setq name_or1 "Хабаpовский филиал" name_or2 "ОАО ГИПРОДОРHИИ")
);end progn
(progn
(setq name_1 (read-line fd) name_2 (read-line fd))
(setq nach (read-line fd) glte (read-line fd) gip (read-line fd) nknt (read-line fd))
(setq nkomp (read-line fd) nagru (read-line fd) shifr (read-line fd))
(setq marm1 (read-line fd) marm2 (read-line fd) marm3 (read-line fd))
(setq mst (read-line fd) name_or1 (read-line fd) name_or2 (read-line fd))
(if (= name_or1 nil) (setq name_or1 ""));end if
(if (= name_or2 nil) (setq name_or2 ""));end if
(setq fd (close fd))));end progn if fd=nil
 
(SET_TILE "name_or1" name_or1) (SET_TILE "name_or2" name_or2)
(SET_TILE "name_1" name_1) (SET_TILE "name_2" name_2)
(SET_TILE "nach" nach) (SET_TILE "glte" glte)
(SET_TILE "gip" gip) (SET_TILE "nknt" nknt)
(SET_TILE "nkomp" nkomp) (SET_TILE "nagru" nagru)
(SET_TILE "shifr" shifr) (SET_TILE "marm1" marm1)
(SET_TILE "marm2" marm2) (SET_TILE "marm3" marm3)
(SET_TILE "mst" mst)
 
(action_tile "name_or1" "(setq name_or1 $value)")
(action_tile "name_or2" "(setq name_or2 $value)")
(action_tile "name_1" "(setq name_1 $value)")
(action_tile "name_2" "(setq name_2 $value)")
(action_tile "nach" "(setq nach $value)")
(action_tile "glte" "(setq glte $value)")
(action_tile "gip" "(setq gip $value)")
(action_tile "nknt" "(setq nknt $value)")
(action_tile "nkomp" "(setq nkomp $value)")
(action_tile "nagru" "(setq nagru $value)")
(action_tile "shifr" "(setq shifr $value)")
(action_tile "marm1" "(setq marm1 $value)")
(action_tile "marm2" "(setq marm2 $value)")
(action_tile "marm3" "(setq marm3 $value)")
(action_tile "mst" "(setq mst $value)")
(action_tile "accept" "(setq dialog_ok T)(done_dialog 0)")
(action_tile "cancel" "(done_dialog 0)")
(start_dialog)
(if (= dialog_ok T) (progn
(setq fd (open (strcat cur_dir "/stamp.dat") "w"))
(write-line name_1 fd) (write-line name_2 fd) (write-line nach fd)
(write-line glte fd) (write-line gip fd) (write-line nknt fd)
(write-line nkomp fd) (write-line nagru fd) (write-line shifr fd)
(write-line marm1 fd) (write-line marm2 fd) (write-line marm3 fd)
(write-line mst fd) (write-line name_or1 fd) (write-line name_or2 fd)
(setq fd (close fd))));end progn if dialog_ok=T
);end defun stam_dat
 
(defun plot_chert ()
;загрузка необходимых атрибутов отрисовки
(init_atr)
(setq spis_diam_stet (list '(6 0.222) '(7 0.302) '(8 0.395) '(9 0.499) '(10 0.617) '(12 0.888)
'(14 1.208) '(16 1.578) '(18 1.998) '(20 2.466) '(22 2.984) '(25 3.85) '(28 4.83) '(32 6.31)))
(setq chert_pl_exit nil)
(while (= chert_pl_exit nil)
(setq vid_cher nil vid_tabl nil)
(if (< (setq dcl_id (load_dialog "chert_pl.dcl")) 0) (exit))
(if (not (new_dialog "menu_ch_pl" dcl_id)) (exit))
(if (= work_obj T) (mode_tile "but_most_pl" 0) (mode_tile "but_most_pl" 1)
);end if
 
(action_tile "but_most_pl" "(done_dialog 0)(setq vid_cher 0)")
(action_tile "but_opor_pl" "(done_dialog 0)(setq vid_cher 1)")
(action_tile "but_prol_pl" "(done_dialog 0)(setq vid_cher 2)")
(action_tile "but_podh_pl" "(done_dialog 0)(setq vid_cher 3)")
(action_tile "but_tabl_pl" "(done_dialog 0)(setq vid_cher 4)")
(action_tile "but_razb_pl" "(done_dialog 0)(setq vid_cher 5)")
(action_tile "but_stpo_pl" "(done_dialog 0)(setq vid_cher 6)")
(action_tile "exit_chert_pl" "(setq chert_pl_exit T)(done_dialog 0)")
(start_dialog)
(if (= vid_cher 0) (progn (load "obvidpl") (obvid_pl)));end progn if
(if (= vid_cher 1) (opora_plot));end if
(if (= vid_cher 2) (prol_plot));end if
(if (= vid_cher 3) (podh_plot));end if
(if (= vid_cher 4) (tabl_plot));end if
(if (= vid_cher 5) (alert "Программа в стадии разработки"));end if
(if (= vid_cher 6) (progn (load "strpodpl") (strpod_pl)));end progn if
);end while
);end plot_chert
 
(defun opora_plot ()
(setq vid_kons nil)
(if (< (setq dcl_id (load_dialog "chert_pl.dcl")) 0) (exit))
(if (not (new_dialog "opor_pl" dcl_id)) (exit))
(if (= work_obj T) (mode_tile "op_obv_pl" 0) (mode_tile "op_obv_pl" 1)
); end if
 
(action_tile "op_obv_pl" "(done_dialog 0)(setq vid_kons 1)")
(action_tile "op_stol_pl" "(done_dialog 0)(setq vid_kons 2)")
(action_tile "op_shst_pl" "(done_dialog 0)(setq vid_kons 3)")
(action_tile "op_kabns_pl" "(done_dialog 0)(setq vid_kons 4)")
(action_tile "exit_opor_pl" "(done_dialog 0)")
(start_dialog)
(if (= vid_kons 1) (progn (load "opplot") (oppl)));end progn if
(if (= vid_kons 2) (progn (load "stolb") (stolpl)));end progn if
(if (= vid_kons 3) (progn (load "shstpl") (shstpl)));end progn if
(if (= vid_kons 4) (progn (load "karkas") (karkas)));end progn if
);end opora_plot
 
(defun prol_plot ()
(setq vid_kons nil)
(if (< (setq dcl_id (load_dialog "chert_pl.dcl")) 0) (exit))
(if (not (new_dialog "prol_pl" dcl_id)) (exit))
(if (= work_obj T) (mode_tile "pr_popr_pl" 0) (mode_tile "pr_popr_pl" 1)
);end if
 
(action_tile "pr_popr_pl" "(done_dialog 0)(setq vid_kons 1)")
(action_tile "pr_modebal15_pl" "(done_dialog 0)(setq vid_kons 2)")
(action_tile "pr_modebal18_pl" "(done_dialog 0)(setq vid_kons 3)")
(action_tile "exit_prol_pl" "(done_dialog 0)")
(start_dialog)
(if (= vid_kons 1) (progn (load "prolpl") (prolpl)));end progn if
(if (= vid_kons 2) (progn (load "prolpl") (mode_bal15_pl)));end progn if
(if (= vid_kons 3) (progn (load "prolpl") (mode_bal18_pl)));end progn if
);end prol_plot
 
(defun podh_plot ()
(setq vid_kons nil)
(if (< (setq dcl_id (load_dialog "chert_pl.dcl")) 0) (exit))
(if (not (new_dialog "podh_pl" dcl_id)) (exit))
(action_tile "pod_lsh_pl" "(done_dialog 0)(setq vid_kons 1)")
(action_tile "exit_podh_pl" "(done_dialog 0)")
(start_dialog)
(if (= vid_kons 1) (progn (load "lshpl") (lshpl)));end progn if
);end podh_plot
 
(defun tabl_plot ()
(if (< (setq dcl_id (load_dialog "chert_pl.dcl")) 0) (exit))
(if (not (new_dialog "tabl_pl" dcl_id)) (exit))
 
(action_tile "ta_spe_pl" "(done_dialog 0)(setq vid_tabl 1)")
(action_tile "ta_spes_pl" "(done_dialog 0)(setq vid_tabl 2)")
(action_tile "ta_vrs_pl" "(done_dialog 0)(setq vid_tabl 3)")
(action_tile "ta_sta_pl" "(done_dialog 0)(setq vid_tabl 4)")
(action_tile "ta_ram_pl" "(done_dialog 0)(setq vid_tabl 5)")
(action_tile "ta_vor_pl" "(done_dialog 0)(setq vid_tabl 6)")
(action_tile "exit_tabl_pl" "(done_dialog 0)")
(start_dialog)
(if (/= vid_tabl nil) (progn (load "tabl") (tablpl)));end progn if
);end tabl_plot
 
(defun init_atr ()
;загрузка размерных переменных
(setvar "cmdecho" 0) (setvar "dimtad" 1) (setvar "dimasz" 0) (setvar "dimscale" 1.0)
(setvar "dimtsz" 1.0) (setvar "dimtxt" 2.5) (setvar "dimexo" 1.0)
(setvar "dimexe" 1.0) (setvar "dimdle" 1.0) (initget 41)
;создание требуемых слоев с проверкой
(if (not (tblsearch "layer" "0"))
(command "_layer" "_make" "0" "_color" "7" "" ""));end if
(if (not (tblsearch "layer" "red"))
(command "_layer" "_make" "red" "_color" "1" "" ""));end if
(if (not (tblsearch "layer" "blue"))
(command "_layer" "_make" "blue" "_color" "5" "" ""));end if
(if (not (tblsearch "layer" "brown"))
(command "_layer" "_make" "brown" "_color" "24" "" ""));end if
 
;загрузка требуемых типов линий с проверкой
(if (not (tblsearch "ltype" "continuous"))
(command "_linetype" "_load" "continuous" "most" ""));end if
(if (not (tblsearch "ltype" "dashdot"))
(command "_linetype" "_load" "dashdot" "most" ""));end if
(if (not (tblsearch "ltype" "dashed2"))
(command "_linetype" "_load" "dashed2" "most" ""));end if
 
(command "_style" "standard" "most.shx" "0" "1.0" "0" "" "" "")
(command "_linetype" "_set" "continuous" "")
(command "_layer" "_set" "0" "")
);end defun init_atr
 
;функции обpаботки вводимых данных
(defun read_line ()
(setq spis_el (list " ") fd (open fff_r "r"))
;составление списка из точек
(if (/= fd nil) (progn
(while (setq line (read-line fd))
(setq spis_el (cons line spis_el)));end while
(close fd)));end progn if
(setq spis_el (cdr (reverse spis_el)))
);end defun read_line
 
(defun mode_line ()
(setq spis_el1 spis_el spis_el (list " ") n_el 0)
(if (/= spis_el1 nil)
(repeat col_el (setq line1 (nth n_el spis_el1))
(if (/= nom_el n_el) (setq spis_el (cons line1 spis_el))
(progn
(if (= klav_el 2) (setq spis_el (cons line1 spis_el)));end if
(if (= klav_el 3) (setq spis_el (cons line spis_el)));end if
(if (= klav_el 4)
(setq spis_el (cons line spis_el) spis_el (cons line1 spis_el)));end if
));end progn if nom_el=n_el
(setq n_el (+ n_el 1)));end repeat
);end if
(if (= klav_el 2) (setq spis_el (cons line spis_el)));end if
(setq spis_el (cdr (reverse spis_el)))
(if (and (= klav_el 1) (/= nom_el 0)) (setq nom_el (- nom_el 1)));end if
(if (= klav_el 2) (setq nom_el (- (length spis_el) 1)));end if
);end defun mode_line
 
(defun save_line ()
(setq fd (open fff_r "w") col_el (length spis_el) n_el 0)
(repeat col_el
(setq line (nth n_el spis_el)) (write-line line fd)
(setq n_el (+ n_el 1)));end repeat
(close fd)
);end defun save_line
 
;функция для отpисовки чеpтежей
(defun dxy (point xxx yyy)
(setq pppp (polar point 0 xxx))
(polar pppp (/ pi 2.0) yyy)
);end defun dxy
 
(defun s_shem ()
;создание списка пpолетных стpоений
(setq spis_pr nil)
(setq fd (open (strcat cur_dir "/ob_data.dat") "r"))
(if (= fd nil) (alert "Заполните pаздел 'Общие данные'!")
(progn
(setq shema (read-line fd)) (close fd)
(setq col_sim (strlen shema) nom_sim 1 ocon nil)
(setq spis_pr (list " ") l_pr "" col_pr 1)
(repeat col_sim
(setq simb (substr shema nom_sim 1))
(if (or (= simb "+") (= simb "x") (= simb "х"))
(if (= simb "+") (setq ocon T) (setq col_pr (atoi l_pr) l_pr ""));end if
(setq l_pr (strcat l_pr simb)));end if
(if (= nom_sim col_sim) (setq ocon T));end if
 
(if (= ocon T) (progn
(repeat col_pr (setq spis_pr (cons (atof l_pr) spis_pr)));end repeat
(setq ocon nil col_pr 1 l_pr "")
));end progn if
(setq nom_sim (+ nom_sim 1)));end repeat
(setq spis_pr (cdr (reverse spis_pr)))
));end progn if fd=nil
);end defun s_shem
 
(defun s_ugol (ugol)
(setq param "" grad nil minu nil secu nil)
(setq col_sim (strlen ugol) nom_sim 1 ocon nil)
(repeat col_sim
(setq simb (substr ugol nom_sim 1))
(if (/= simb " ") (setq param (strcat param simb))
(if (/= param "") (setq ocon T)));end if if
(if (and (= nom_sim col_sim) (/= param "")) (setq ocon T));end if
(if (= ocon T) (progn (setq ocon nil)
(if (and (/= grad nil) (/= minu nil) (= secu nil)) (setq secu param));end if
(if (and (/= grad nil) (= minu nil)) (setq minu param));end if
(if (= grad nil) (setq grad param));end if
(setq param "")));end progn ocon=T
(setq nom_sim (+ nom_sim 1)));end repeat
(if (= secu nil) (setq secu "0"));end if
(if (= minu nil) (setq minu "0"));end if
(if (= grad nil) (setq grad "0"));end if
(setq ugol (+ (atof grad) (/ (+ (atof minu) (/ (atof secu) 60)) 60)))
);end defun s_ugol
 
(defun init_param (param)
(setq col_sim (strlen param) n_sim 1 param1 "" err nil)
(repeat col_sim (setq sim (substr param n_sim 1))
(if (= sim ",") (setq sim "."));end if
(if (or (= sim "-") (= sim ".") (= sim "0") (= sim "1") (= sim "2") (= sim "3")
(= sim "4") (= sim "5") (= sim "6") (= sim "7") (= sim "8") (= sim "9"))
(setq param1 (strcat param1 sim)) (setq err T));end if
(setq n_sim (+ n_sim 1)));end repeat
(if (= err T) (alert "Введите корректное значение!"));end if
(mode_tile "edit_el" 0)
(setq param param1)
);end defun init_param
 
(defun init_diam (diam)
(setq col_diam (length spis_diam_stet) n_diam 0 err_diam T)
(while (and (= err_diam T) (< n_diam col_diam))
(setq d_stet (nth 0 (nth n_diam spis_diam_stet)))
(if (= diam d_stet) (setq err_diam nil mas_diam (nth 1 (nth n_diam spis_diam_stet))));end if
(setq n_diam (+ n_diam 1)));end while
(if (= err_diam T) (alert "Данного диаметра стержней не существует!"));end if
);end defun init_diam

gomer

Members


Статус

23 сообщений

Где: Ukraine
Род занятий:
Возраст:

#7273   2014-02-12 15:47 GMT+3 часа(ов)      
Цитата
user1140 :
выдаёт ошибку "; ошибка: неверный тип аргумента: fixnump: nil


Вообще здесь есть ветка по автолиспу. Ошибка говорит о том, что не задано значение переменной. без диалогового окна трудно что либо сказать с таким количеством кода. Попробуйте использовать средства vlide для отладки программы
> 1 <


Онлайн :

0 пользователь(ей), 18 гость(ей) :




Реклама на сайте: