View Full Version : images and DCL
johannvonspiralspine
2004-12-21, 03:44 PM
I've been attempting to place a slide in a dialogue box (I'm using DCL). I can't figure it out. If someone can either show me an example or point out a good place to find an example I would appreciate it.
Thanks
Coolmo
2004-12-21, 05:12 PM
snipit from DCL file
: image {
key = "image1";
height = 1;
width = 3;
}
snipit from LSP file
(start_image "image1")
(slide_image 0 0 (dimx_tile "image1") (dimy_tile "image1") "imagename")
(end_image)
...where image1 is the key name of the image called from the DCL file and imagename is the image slide name found in a directory in your support path. The (dimx_tile "image1") and (dimy_tile "image1") simply query the size of your image in the dialog box to properly place your slide.
johannvonspiralspine
2004-12-21, 05:21 PM
I'm desparate for answers. There's definately a problem in my Lisp file.
DCL file:
: image {key = "img";
alignment = centered;
fixed_width = true;
fixed_height = true;
is_tab_stop = false;
LSP file:
(setq mySlideName1 "bend.sld")
(setq myKey1 "img")
(upDateImage mySlideName1 myKey1)
(defun upDate (sldName1 key1))
(setq IMWA (dimx_tile key1))
(setq IMHA (dimy_tile key1))
(start_image key1)
(fill_image 0 0 IMWA IMHA 0)
(slide_image 0 0 IMWA IMHA sldName1)
(end_image)
thanks
Coolmo
2004-12-21, 05:26 PM
check your other post for my example but looking at your code, it appears as if you need to use:
(start_image Mykey1)
instead of:
(start_image key1)
since you've assigned Mykey1 to equal "img" here:
(setq myKey1 "img")
which is the actual image key from the DCL (unless I'm missing something)
johannvonspiralspine
2004-12-21, 05:42 PM
I cut and pasted your piece of code and I'm still missing something. Here's what I have now:
DCL:
: image {key = "img";
alignment = centered;
fixed_width = true;
fixed_height = true;
is_tab_stop = false;
Lisp:
(start_image "img")
(slide_image 0 0 (dimx_tile "img") (dimy_tile "img") "c:/r13/win/bend.sld")
(end_image)
thanks
Coolmo
2004-12-21, 05:50 PM
You might need the end bracket "}" in the DCL file (I'm just going by what you posted) and when you refer to the image name, just put the slide name (i.e. "Slidename") and make sure your slide is in your support path. Please, anyone, correct me if I'm wrong here but when you type out paths in Lisp you need to reverse the slash because the front slash acts as a character switch (or something to that affect). In that case "c:/slide" would be "c:\ slide". Try that and see what happens.
Coolmo
2004-12-21, 05:51 PM
I forgot to ask. What actually does happen? Error message or something or just nothing?
johannvonspiralspine
2004-12-21, 06:05 PM
The dialogue box opens, but there's no image.
Mike.Perry
2004-12-21, 06:38 PM
Hi
Please note I've *merged* the two threads due to the fact they were asking the same question (as far as I can see), if that's not the case please let me know, I will then correct my mistake.
AUGI Forum Guidelines (http://forums.solidvapor.net/faq.php?faq=vb_augi)
Thanks, Mike
Forum Moderator
Coolmo
2004-12-21, 08:14 PM
is there anything else in the dialog box? Did yo try the bracket thing and taking out the path thing? Can you simply type "VSLIDE" and then the slide's name and see it on screen?
peter
2004-12-22, 01:53 PM
Hello,
I have played around with image files before and have this example to share.
The example has two image tiles that when selected change from one image to another.
Hope it helps.
Peter Jamtgaard
Coolmo
2004-12-23, 02:57 PM
You ever get it to work? Let us know if yes and what the problem was so maybe we can send others off in the right direction if they encounter the same problem. Thanks.
CAB2k
2004-12-23, 10:30 PM
Try this,
DCL:
: image {key = "img";
alignment = centered;
fixed_width = true;
fixed_height = true;
is_tab_stop = false;
}
Lisp:
(if (findfile "c:/r13/win/bend.sld")
(progn
(start_image "img")
(setq xx (dimx_tile "img"))
(setq yy (dimy_tile "img"))
(slide_image 0 0 xx yy "c:/r13/win/bend.sld")
(end_image)
)
(alert "\nSlide missing.")
)
CAB2k
2004-12-23, 10:51 PM
Nice Peter..
FYI You can change this:
(defun SET_IMAGES (IMREF SLDNAM)
(setq width (dimx_tile IMREF)
height (dimy_tile IMREF)
)
(start_image IMREF)
(fill_image 0 0 width height -15) ;-2 = AutoCAD background color
(end_image)
(start_image IMREF)
(slide_image
0
0
(dimx_tile IMREF)
(dimy_tile IMREF)
SLDNAM
)
(end_image)
)
To this:
(defun SET_IMAGES (IMREF SLDNAM)
(setq width (dimx_tile IMREF)
height (dimy_tile IMREF)
)
(start_image IMREF)
(fill_image 0 0 width height -15)
(slide_image 0 0 width height SLDNAM)
(end_image)
)
vBulletin® v3.6.7, Copyright ©2000-2009, Jelsoft Enterprises Ltd.