Search the Community
Showing results for tags 'dcl action tile string'.
-
I m having an issue with my lisp code for a DCL dialog box I made. It seems my string is too long for action_tile "accept" and I m getting error "bad argument type: lselsetp nil". The problem is, apparently, that I have too many input values that makes it long. If I remove one or two lines it works but I need to get them all in, store them and do validation checking. Is there a way to make it work like spiting the string or maybe rewrite it better to alleviate the problem? Any suggestions will be appreciated. Here is the section I m talking about. (action_tile "accept" (strcat "(progn (setq lfm_ (get_tile \"lfm\")) (setq lfv_ (get_tile \"lfv\")) (setq lhd_ (get_tile \"lhd\")) (setq lbl_ (get_tile \"lbl\")) (setq nhb_ (get_tile \"nhb\")) (setq nbl_ (get_tile \"nbl\")) (setq los_ (get_tile \"los\")) (setq lor_ (get_tile \"lor\")) (setq lom_ (get_tile \"lom\")) (setq nsr_ (get_tile \"nsr\")) (setq orient_ (nth (atoi (get_tile \"orient\")) orientls)) (setq sud_ (nth (atoi (get_tile \"sud\")) sudls)) (setq rbn_ (get_tile \"rbn\")) (setq ris_ (get_tile \"ris\")) (setq off_ (get_tile \"off\")) (cond ((or (not (distof lfm_)) (<= (atof lfm_) 0)) (set_tile \"error\" \"Invalid input!\") (mode_tile \"lfm\" 2) ; set focus on error item ) ((or (not (distof lfv_)) (<= (atof lfv_) 0)) (set_tile \"error\" \"Invalid input!\") (mode_tile \"lfv\" 2) ; set focus on error item ) ((or (not (distof lhd_)) (<= (atof lhd_) 0)) (set_tile \"error\" \"Invalid input!\") (mode_tile \"lhd\" 2) ; set focus on error item ) ((or (not (distof lbl_)) (<= (atof lbl_) 0)) (set_tile \"error\" \"Invalid input!\") (mode_tile \"lbl\" 2) ; set focus on error item ) ((or (not (distof nhb_)) (vl-string-position (ascii \".\") nhb_) (<= (atof nhb_) 0)) (set_tile \"error\" \"Invalid input!\") (mode_tile \"nhb\" 2) ; set focus on error item ) ((or (not (distof nbl_)) (vl-string-position (ascii \".\") nbl_) (<= (atof nbl_) 0)) (set_tile \"error\" \"Invalid input!\") (mode_tile \"nbl\" 2) ; set focus on error item ) ((or (not (distof los_)) (<= (atof los_) 0)) (set_tile \"error\" \"Invalid input!\") (mode_tile \"los\" 2) ; set focus on error item ) ((or (not (distof lor_)) (<= (atof lor_) 0)) (set_tile \"error\" \"Invalid input!\") (mode_tile \"lor\" 2) ; set focus on error item ) ((or (not (distof lom_)) (<= (atof lom_) 0)) (set_tile \"error\" \"Invalid input!\") (mode_tile \"lom\" 2) ; set focus on error item ) ((or (not (distof nsr_)) (vl-string-position (ascii \".\") nsr_) (<= (atof nsr_) 0) (> (atoi nsr_) (atoi nhb_))) (set_tile \"error\" \"Invalid input!\") (mode_tile \"nsr\" 2) ; set focus on error item ) (t (done_dialog) (setq userclick T)) ) )" ) )