Call slide image based on list selection

#1
I am looking to call a specific image slide for individual items from a list.
In the lisp in the link below the slides are linked to the 'tile' or 'box' selected which then populates the list(sizes) in the list box widow.

viewtopic.php?p=7072&sid=324356655be7dc ... 11e3#p7072.
.

Code: Select all

	(action_tile "rb22"				 						;toggle RF option
	"(cond 
		((and (= sel \"flg_\")(= flg \"wn_\"))
		(progn
			(L4_ON)
			(SET_WNRF_IMAGE)			
			(RB22_FLAG)
		)
		)
What I am now looking at is, can I display a slide based on the size selected from the size window/box?
This is my first attempt:

Code: Select all

(defun SET_IMAGE ()
;
  (setq sldFile(nth 2 SIZE_DIMS))
  (if (not (findfile sldFile))
    (progn
      (alert (strcat "Not found file: " sldFile))
      (setq sldFile "default.sld")))
;
  (setq w (dimx_tile "imagekey")   	;get image tile width
        h (dimy_tile "imagekey")    ;get image tile height
  );end of setq
 ; 
  (start_image "imagekey")			;start the image
  (fill_image 0 0 w h 251)
  (slide_image 0 0 w h sldFile)		;display a slide
  (end_image)						;end image
) ;End SET_IMAGE
Here is a sample line from a dim (list) file:

Code: Select all

("1/2" "1/2" "1-2_wnrf.sld" 89.00 11.20 34.90 4 15.80 21.30 48.00 00.60)
Where nth 2 is "1-2_wnrf.sld"
??

Steve

Re: Call slide image based on list selection

#3
I thought I should add what I have done.

Code: Select all

(defun DIM_LIST (/ TEST)
  (OPEN_DIM_FILE)
  (progn
    (while (/= SIZE TEST)
      (setq
        SIZE_DIMS (read (read-line DIM_FILE))
        TEST (strcase (nth 0 SIZE_DIMS))
      ) ;end setq
    ) ;end while
    (close DIM_FILE)
  ) ;end progn
    (SET_IMAGE) :****************added this
) ;end DIM_LIST
 ;-----------------------------------------------------------------------;
AND

Code: Select all

(defun SET_IMAGE ( / sldFile)
  (setq sldFile (nth 2 SIZE_DIMS))
  (if (not (findfile sldFile))
    (progn
      (alert (strcat "Not found file: " sldFile))
      (setq sldFile "default.sld")))    
	(IMAGE)
 ) ;end SET_IMAGE
 
AND THIS

Code: Select all

(defun IMAGE ()
;
  (setq w (dimx_tile "imagekey")   	;get image tile width
        h (dimy_tile "imagekey")    ;get image tile height
  );end of setq
  (start_image "imagekey")			;start the image
  (fill_image 0 0 w h 251)
  (slide_image 0 0 w h SLDFILE)		;display a slide
  (end_image)						;end image
) ;End IMAGE
  ;--------------------------------------------------------------------;
  

.
cron