Page 1 of 1

Child Dialog Actions *** solved :)

Posted: Thu Nov 16, 2023 12:08 pm
by sln8458
Struggling with this atm.
Wafer L3.png
Wafer L3.png (51.85 KiB) Viewed 8164 times
.
In the image, the child dialog has three options.
I want to be able to select different options for the column Face L3

Here is the current OK Action Tile:

Code: Select all

  (action_tile "accept" "(setq sel fred3)(done_dialog)" )
My options are:

Code: Select all

	(defun L3_ON ()
	 (mode_tile "rb21" 0)
	 (mode_tile "rb22" 0)
	 (mode_tile "rb23" 0)
	)
	(defun L3_CV_ON ()
	 (mode_tile "rb21" 0) 
;	 (mode_tile "rb22" 0);NOT REQUIRED
	 (mode_tile "rb23" 0)
	)
	(defun L3_FCV_ON ()
;	 (mode_tile "rb21" 0);NOT REQUIRED 
	 (mode_tile "rb22" 0) 
	 (mode_tile "rb23" 0)
	)	
.
I've tried

Code: Select all

  (action_tile "accept" "(setq sel fred3)(L3_FCV_ON )(done_dialog)" )
No good :(

Re: Child Dialog Actions - solved

Posted: Mon Nov 20, 2023 10:10 am
by sln8458
Solved :)

Actually it was simple, I had just forgotten :(
Note: PCV_CV is a new function in the main body of the code

Code: Select all

(defun PCV_CV ()
	(L3_CV_ON)
);end PCV_CV
In the child dialog code is:

Code: Select all

(defun CHECK_SELECTIONS_N3 () ;
	(cond 
		((/= cv_sel NIL)
			(setq sel cv_sel)
			(done_dialog)
		) 		
		(t (alert "OOPS! SELECT CHECK VALVE TYPE - TRY AGAIN!"))  
	);end of cond
) ;end CHECK_SELECTIONS

Code: Select all

  (action_tile "cancel" "(done_dialog)(setq cv_sel nil)" )    		;if cancel selected do this
  (action_tile "accept" "(CHECK_SELECTIONS_N3)")  			;if OK selected do this   
  (start_dialog)   							;start the nested dialogue box
  (unload_dialog dcl_id3) 						;unload the nested dialogue box
  (PCV_CV)