From: ·······@ibm.net
Subject: Help! AutoLISP/DCL problem with Slide files
Date: 
Message-ID: <3647913f.513232@news1.ibm.net>
I'm fairly experienced with AutoLISP and DCL scripts however, I'm
having a bit of a problem with an area new to me.  I'm trying to get
slide files to display in one tile and having no luck at it.  Please
have a look at the following sample code (not what the finished
application will look like:)

The dcl file:

pneu : 	dialog {				//dialog name
      
	label = "Pneuamtic Symbols" ;		//give it a label


	:row	{
	:boxed_column { 
	:text_part {
	label = "This is a text part";
			}
		}
:boxed_column {
:image{key="im";width=113;aspect_ratio=0.53;color=-2;}
			}
:boxed_column	{
	ok_cancel;
		}
	}
	}
 
and now the lisp file:

(defun C:pneu ()			;define function	
  
(setq dcl_id (load_dialog "pneu.dcl"))		;load dialog
(if (not (new_dialog "pneu" dcl_id)	;test for dialog
);not
(exit)						;exit if no dialog
);if

(start_dialog)					;start dialog

(setq w (dimx_tile "im")
      h (dimy_tile "im"))

(start_image "im")
(slide_image 0 0 w h "valve")
(end_image)


(unload_dialog dcl_id)				;unload

(princ)

)

what I get is a box with the text, OK and Cancel and a box with a
background color.  Changing the width and height changes the box, but
still no image.  I thought it was the slide file I was using but I
tried another silde file from another application and it didn't work
and ever the acad.slb (eg. acad(torus)).  Any suggestions.....?

For an extra bit of fun.. the purpose of this is to make a dialogue
that will have a pulldown list and as the user selects the list, the
images will change.  The OK button will then insert the block into the
drawing.  Is this sort of thing possible in AutoLISP? 

Thanks for the help and please reply by email as well as usenet.

Sean Dotson
DCS Engineering / Aidlin Automation Systems
·······@gebousa.com
From: Fred R. Weaver
Subject: Re: Help! AutoLISP/DCL problem with Slide files
Date: 
Message-ID: <729kfd$ls2$1@news.ap.net>
If the slide is part of a library (.slb) you need to include it.
>(slide_image 0 0 w h "valve")
(slide_image 0 0 w h "acad(torus)")


--
Fred R. Weaver
CAD Mapping Tools
http://users.ap.net/~fredlee
···············@ap.net

·······@ibm.net wrote in message <···············@news1.ibm.net>...
>I'm fairly experienced with AutoLISP and DCL scripts however, I'm
>having a bit of a problem with an area new to me.  I'm trying to get
>slide files to display in one tile and having no luck at it.  Please
>have a look at the following sample code (not what the finished
>application will look like:)
>
>The dcl file:
>
>pneu : dialog { //dialog name
>
> label = "Pneuamtic Symbols" ; //give it a label
>
>
> :row {
> :boxed_column

> :text_part {
> label = "This is a text part";
> }
> }
>:boxed_column {
>:image{key="im";width=113;aspect_ratio=0.53;color=-2;}
> }
>:boxed_column {
> ok_cancel;
> }
> }
> }
>
>and now the lisp file:
>
>(defun C:pneu () ;define function
>
>(setq dcl_id (load_dialog "pneu.dcl")) ;load dialog
>(if (not (new_dialog "pneu" dcl_id) ;test for dialog
>);not
>(exit) ;exit if no dialog
>);if
>
>(start_dialog) ;start dialog
>
>(setq w (dimx_tile "im")
>      h (dimy_tile "im"))
>
>(start_image "im")
>(slide_image 0 0 w h "valve")
>(end_image)
>
>
>(unload_dialog dcl_id) ;unload
>
>(princ)
>
>)
>
>what I get is a box with the text, OK and Cancel and a box with a
>background color.  Changing the width and height changes the box, but
>still no image.  I thought it was the slide file I was using but I
>tried another silde file from another application and it didn't work
>and ever the acad.slb (eg. acad(torus)).  Any suggestions.....?
>
>For an extra bit of fun.. the purpose of this is to make a dialogue
>that will have a pulldown list and as the user selects the list, the
>images will change.  The OK button will then insert the block into the
>drawing.  Is this sort of thing possible in AutoLISP?
>
>Thanks for the help and please reply by email as well as usenet.
>
>Sean Dotson
>DCS Engineering / Aidlin Automation Systems
>·······@gebousa.com
>