Jump to content

Splash screen


BIGAL

Recommended Posts

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

 

 

 

 

Link to comment
Share on other sites

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 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites


(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)

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 by BIGAL
Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...