BIGAL Posted January 26, 2021 Share Posted January 26, 2021 I am looking for the simplest way to display an image on the screen for say 2 seconds then close, no user interaction, the image is a 3d perspective. It is to display on 1st load of a lisp. I am trying to only use lisp. And not any external coding opendcl etc. Or a .Net solution this may be the only way though in the end. I tried making a slide and use vslide a simple method, ignoring slide making problems. Tried it as command mode and calling a script. I have it working on and off 1st time will work then just does the delay no image. I am not sure if its a graphics card problem, using NVIDIA GEOFORCE GTX 1050. vslide "D:/1W/abc def.sld" DELAY 5000 Regen Quote Link to comment Share on other sites More sharing options...
jonathann3891 Posted January 26, 2021 Share Posted January 26, 2021 I know this is possible with OpenDCL Quote Link to comment Share on other sites More sharing options...
dan20047 Posted January 26, 2021 Share Posted January 26, 2021 Probably not what you're looking for, but if you can recode your image as vectors then use grdraw? example for text - http://www.lee-mac.com/grtext.html Lee's remarks mentions help from Elpanov Evgeniy for the method of vector encoding. I assume that meant selected geometry was converted to a vector list. Check theswamp.org Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted January 26, 2021 Share Posted January 26, 2021 2 hours ago, dan20047 said: Lee's remarks mentions help from Elpanov Evgeniy for the method of vector encoding. I assume that meant selected geometry was converted to a vector list. Since the vectors were generated for a fixed-width font for which each character was 10px wide, the X & Y pixel coordinates were encoded as a single integer with the X coordinate value represented by the units, and the Y coordinate value represented by the tens & hundreds. Quote Link to comment Share on other sites More sharing options...
rlx Posted January 26, 2021 Share Posted January 26, 2021 (defun Splash (s w / sn dcl-fn dcl-fp dcl-id x y) (vl-load-com) (cond ((not (= (type s) 'STR))(princ (strcat "\nInvalid slide name : " (vl-princ-to-string s)))) ((not (setq sn (findfile s))) (princ (strcat "\nSlide not found : " (vl-princ-to-string s)))) ((not (= (type w) 'INT))(princ (strcat "\nInvalid value for delay : " (vl-princ-to-string w)))) ((not (and (setq dcl-fn (vl-filename-mktemp ".dcl")) (setq dcl-fp (open dcl-fn "w")))) (princ "\nUnable to show slide")) (t (write-line (strcat "im:dialog{label=\"Bigal\";:image_button{key=\"im\";color=-2;width=100;" "aspect_ratio=1;allow_accept=true;is_default=true;}}") dcl-fp) (close dcl-fp)(gc)(setq dcl-id (load_dialog dcl-fn)) (new_dialog "im" dcl-id)(setq x (dimx_tile "im") y (dimy_tile "im"))(start_image "im")(slide_image 0 -15 x y sn)(end_image) (wait w)(term_dialog)(if dcl-id (unload_dialog dcl-id))(if (and dcl-fn (findfile dcl-fn))(vl-file-delete dcl-fn)) ) ) (princ) ) (defun wait (sec / stop) (setq stop (+ (getvar "DATE") (/ sec 86400.0))) (while (> stop (getvar "DATE")))) (Splash "d:/Temp/Lisp/Cad-tutor/Bigal/Furntable.sld" 5) Quote Link to comment Share on other sites More sharing options...
ronjonp Posted January 26, 2021 Share Posted January 26, 2021 You could create an HTA script. Open using wscript and within the HTA have a timer set to close the widow after X milliseconds. I did this messing around about 10 years ago but unfortunately I can't give you an example. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted January 26, 2021 Author Share Posted January 26, 2021 (edited) Thank you Rlx the answer is the (term_dialog) something I did not know about as I have said before always learning and finding new commands. Thanks Also Ronjonp. The only issue I have now is it does not seem to like the size of the slide as I made a slide of an image its is quite large will play more with that side of things. I may have to sacrifice a shaded image. But it is working. Edited January 26, 2021 by BIGAL Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.