Page 1 of 1

Strange behavior from Check Selections

Posted: Thu Mar 30, 2023 1:13 am
by sln8458
I working on my piping add-on lisp to have individual dialogs for each of the main selection catagories.
For each child dialog I want to have a 'check selection' loop to ensure that ALL appropriate selection have been set.
However on one dialog, (Flanges) one selection fails unless the user selects OK before making a selection.
The 'Fittings' dialog works fine.
This video will help explain, I hope.
https://www.dropbox.com/s/97xic090cgyz5 ... e.avi?dl=0

My question is 'what is wrong'?

Here is the 'check selection' code:

Code: Select all

;-----------------------------------------------------------------------;
(defun CHECK_SELECTIONS_FLG ()
	(cond
		((/= n_flg NIL)(setq flg n_flg)(CHECK_SELECTIONS_FLGFCE))
		(t (alert "OOPS! *flanges dialog* SELECT A FLANGE TYPE - TRY AGAIN!"))
	);end of cond
) ;end CHECK_SELECTIONS_FLG
;----------------------------------------------------
(defun CHECK_SELECTIONS_FLGFCE ()
	(cond
		((/= n_fce NIL)(setq fce n_fce)(CHECK_SELECTIONS_FLGCLS))
		(t (alert "OOPS! *flanges dialog* SELECT THE FLANGE FACE - TRY AGAIN!"))
	);end of cond
) ;end CHECK_SELECTIONS_FLGFCE
;----------------------------------------------------
(defun CHECK_SELECTIONS_FLGCLS ()
	(cond
		((/= n_clss NIL)(setq clss n_clss)(CHECK_SELECTIONS_FLGSCH))
		(t (alert "OOPS! *flange dialog* SELECT A FLANGE CLASS - TRY AGAIN!"))
	);end of cond
) ;end CHECK_SELECTIONS_FLGCLS
;----------------------------------------------------
(defun CHECK_SELECTIONS_FLGSCH ()
	(cond
		((/= n_sch NIL)(setq clss n_clss)(CHECK_SELECTIONS_FLGSZ))
		(t (alert "OOPS! *flange dialog* SELECT A FLANGE SCHEDULE - TRY AGAIN!"))
	);end of cond
) ;end CHECK_SELECTIONS_FLGSCH
;----------------------------------------------------
(defun CHECK_SELECTIONS_FLGSZ () 
   (cond 
		((/= size NIL)(done_dialog)) 
		(t (alert "OOPS! *flange dialog* SELECT A FLANGE SIZE - TRY AGAIN!"))
  );end of cond 
) ;end CHECK_SELECTIONS_FLGSZ
;----------------------------------------------------
The action tile statement for the radio button is:

Code: Select all

;-----------------------------------------------------------------------;
(action_tile "rb41"										;toggle SCH5 option
		(strcat
			"(setq newtile $key)"	
			"(RB41_FLAG)(F_NAME)(READ_DIM_FILE)(FLG_SCH_5)"
		); end strcat
	); END ACTION TILE
;-----------------------------------------------------------------------;
Files attached for info, the Flange dialog is at the endof the lisp.
SteveN

Re: Strange behavior from Check Selections

Posted: Sun Apr 02, 2023 6:30 pm
by QuanNguyen
Hi Steven,
Not sure where the issue was.
Please attach the lisp having the function "term_dialog" for reference.
Regards.
term_dialog.png
term_dialog.png (4.78 KiB) Viewed 89165 times

Re: Strange behavior from Check Selections

Posted: Tue Apr 04, 2023 12:37 am
by QuanNguyen
Hi Steven,

Please check to sure all variables in the function F_NAME are correct.

Code: Select all

(defun F_NAME () 										;DIM file name
	(setq fname (strcat sel ftg flg fce sch clss lgth".DIM"))
	) end F_NAME
it returns the file named "flg_wn_sch_5_.DIM" which does not existing.

Regards,

Re: Strange behavior from Check Selections

Posted: Mon Apr 10, 2023 9:50 am
by SPirou4D
QuanNguyen wrote: ↑
Tue Apr 04, 2023 12:37 am
Regards,
Hi Quan,
It's weird I havn't no news of Steve since 15 days, even when I mail him directly....
maybe an accident???.....
At soon.

Patrick

Re: Strange behavior from Check Selections

Posted: Tue Apr 11, 2023 2:42 am
by sln8458
I'm still here, just having bulding work at home/office so internet access is very limited, + I am project manager for the work so a tad pre-occupied :)

Then there is the end of the UK tax year, so lots to do for the accountant etc :(

SteveN

Re: Strange behavior from Check Selections

Posted: Tue Apr 11, 2023 3:07 am
by SPirou4D
Happy to read you....
I wish you a lot of energy for all these tasks then.
See you later then.
Patrick

Re: Strange behavior from Check Selections

Posted: Mon Jun 08, 2026 9:24 am
by barela
Quan's point about `F_NAME()` looks like the most likely culprit. If the filename is being built before all the variables are populated, the validation can fail even though the dialog selection itself appears correct.

Re: Strange behavior from Check Selections

Posted: Thu Sep 10, 2026 2:39 pm
by MARTIN L
Hi! I Hope i'm at the right place to let you know about my problem ??

I just add my update for intellicad 15 pe on 2 defferent surface pro 11 and 7 (intel)

Everything seems to work well but on both cumputer, if I select multi lines and I want to just unselect one of them, with intellicad 14 I was just holding shift then click on the line I wanted to unselected.. On the 15th version it does not work

I asked (IA) help but nothings worked !!

Does Anybody knows what's happening ??