change diaplayed image - radio button dependant

#1
I’m having trouble specifying/displaying images (slide files).
In the image below when I select ‘Ball Valves’ in column 1 (button S3) the image that I want is displayed.
Image
.
I'm happy :)
Code:

Code: Select all

(action_tile "s3"						;toggle Ball Valve options
	"(L1_OFF)(L2_OFF)(L3_ON)(L4_OFF)(L5_OFF)
	(L1_CLEAR)(L2_CLEAR)(L3_CLEAR)(L4_CLEAR)(L5_CLEAR)
	(RESET_LABELS)(RESET_DIMS)(RESET_LIST)(S3_FLAG)(SET_BV_IMAGE)"	;
	); END ACTION TILE
My next selection will be via column 3 (Face Type, RB21) And here I want to display a new image with the correct Face Type and associated dimensions relating to the dimension table.
However I’m getting the wrong image see below:
Image
.
Code:

Code: Select all

	(action_tile "rb21"				 						;toggle RTJ option
	"(cond 
		((and (= sel \"flg_\")(= flg \"scr_\")) ;END AND
		(progn
			(L4_ON)
			(SET_SO3_IMAGE)			
			(RB21_FLAG)
		);END PROGN
		)
		((and (= sel \"flg_\")(= flg \"so_\"))
		(progn
			(L4_SCR_ON)
			(SET_SO3_IMAGE)			
			(RB21_FLAG)
		)
		)
		((and (= sel \"flg_\")(= flg \"wn_\"))
		(progn
			(L4_ON)
			(SET_WNRTJ_IMAGE)			
			(RB21_FLAG)
		)
		)		
		((and (= sel \"flg_\")(= flg \"sw_\"))
		(progn
			(L4_SW_ON)
			(SET_SW3_IMAGE)				
			(RB21_FLAG)
		)
		)
		((and (= sel \"flg_\")(= flg \"bl_\"))
		(progn
			(L4_ON)
			(SET_BL3_IMAGE)
			(RB21_FLAG)
		)
		)
		((and (= sel \"rtjfbv_\")(= fce \"rtj_\"))
		(progn
			(L4_ON)
			(RB21_FLAG)			
			(SET_BV_IMAGE)
		)
		)	
		(t (progn
			(L4_ON)
			(RB21_FLAG)
			(SET_WNRF_IMAGE)			
		)
		)
	)"
	); END ACTION TILE
		
The image displayed is for 't'
Now I know I'm using the same image 'SET_WNRTJ_IMAGE' for now this is intentional, but even this image is not displaying.
Can anyone see my error?? I've been kicking this around for a few days now & I can't see the wood for the trees 11:)

Steve

Re: change diaplayed image - radio button dependant

#2
I sat down this morning and went back to square 1 with this section of code.
The first parts of the code relate to Flanges and there are more 'levels' to contend with, hence the 'AND' statement.

I solved my own problem, it was me all along!!
It was here:

Code: Select all

		((and (= sel \"rtjfbv_\")(= fce \"rtj_\"))
		(progn
			(L4_ON)
			(RB21_FLAG)			
			(SET_BV_IMAGE)
		)
		)	
.
Specifically here : ((and (= sel \"rtjfbv_\")(= fce \"rtj_\"))

In my simple mind:
(= sel \"rtjfbv_\") ;this is saying that button 'S3' has to be selected.
(= fce \"rtj_\") ; and here is saying that button RB21 has to be selected.

BUT button RB21 is the button this code is associated to.
So this is what I now have (and working :) ):

Code: Select all

		((= sel \"rtjfbv_\")
		(progn
			(L4_ON)
			(RB21_FLAG)			
			(SET_BV2_IMAGE)
		)
		)

Steve