Saturday, November 21, 2009
Home   |   Search   |   About AUGI   |   My AUGI   |   Join Now

Go Back   AUGI Forums > AUGI Technical (English) > Programming > AutoLISP
 Welcome, Guest. 

Login

Join Now FAQ Members List Calendar Search Today's Posts Mark Forums Read

AutoLISP AutoLISP or Visual LISP, learn both here!

Reply
 
Thread Tools Display Modes
Old 2004-06-30, 03:23 PM   #1
jrd.chapman
Member
 
jrd.chapman's Avatar
 
Join Date: 2000-11
Location: Ontario, Canada
Posts: 49
jrd.chapman is going the right wayjrd.chapman is going the right wayjrd.chapman is going the right wayjrd.chapman is going the right way
Default DCL - Embedding an image (logo) in a dialog

Hello all,

I was wondering if anyone had any example code of a dialog with an image emedded simply for aesthetics, i.e., the image has no action, but is just there for display purposes (like a company logo).

I wrote a program for my company and I'd like to play around with some sort of a "splashscreen" scenario and I figured DCL might do this for me (load the dialog with embedded logo on startup).

Anyone have any examples, suggestions, or advice?

Thanks in advance!
John D. Chapman
jrd.chapman is offline   Reply With Quote
Old 2004-06-30, 04:05 PM   #2
kieren
Member
 
kieren's Avatar
 
Join Date: 2003-04
Location: Stafford, UK
Posts: 34
kieren is starting their journey
Default RE: DCL - Embedding an image (logo) in a dialog

I too would be interested in this if anyone has any ideas!

..::KIEREN::..
kieren is offline   Reply With Quote
Old 2004-06-30, 07:15 PM   #3
Coolmo
All AUGI, all the time
 
Coolmo's Avatar
 
Join Date: 2003-10
Posts: 525
Coolmo is glowing brightlyCoolmo is glowing brightlyCoolmo is glowing brightlyCoolmo is glowing brightlyCoolmo is glowing brightlyCoolmo is glowing brightlyCoolmo is glowing brightlyCoolmo is glowing brightlyCoolmo is glowing brightlyCoolmo is glowing brightlyCoolmo is glowing brightly
Default RE: DCL - Embedding an image (logo) in a dialog

The only way I've found to do it is to bring the image into AutoCAD using IMAGE command and then make a slide of the image on screen using MSLIDE. The image comes up looking not so good and the more complicated it is, the slower it loads into the DCL dialog but if you had a small logo or something you were trying to do this with, it should work. By the way, I've only done this in regular AutoLISP, not Visual LISP. I really don't know what that can do.
__________________
COOLMO
If = 0 then
End If
Coolmo is offline   Reply With Quote
Old 2004-07-01, 09:52 AM   #4
kieren
Member
 
kieren's Avatar
 
Join Date: 2003-04
Location: Stafford, UK
Posts: 34
kieren is starting their journey
Wink RE: DCL - Embedding an image (logo) in a dialog

Thanks for the info willams.60073,
Any chance you can post some sample code for lisping?
Cheers!
__________________
..:: KIEREN ::..
Structural Draughtsman
kieren is offline   Reply With Quote
Old 2004-07-01, 02:05 PM   #5
peter
Vice President / Director
 
peter's Avatar
 
Join Date: 2000-09
Location: Kenosha Wisconsin
Posts: 375
peter is shooting for the starspeter is shooting for the starspeter is shooting for the starspeter is shooting for the starspeter is shooting for the starspeter is shooting for the starspeter is shooting for the starspeter is shooting for the starspeter is shooting for the starspeter is shooting for the starspeter is shooting for the stars
Default RE: DCL - Embedding an image (logo) in a dialog

Here is a little example routine that uses slides. I have attached 6 image slides in a zip file.

Here is the code.

Code:
(defun C:IMAGE4 ()
 (setq ID (load_dialog "image4.dcl"))
 (new_dialog "image_dia" ID)
 (switch_on_off)
 (switch_lock_unlock)
 (action_tile "onoff" "(switch_on_off)")
 (action_tile "lockunlock" "(switch_lock_unlock)")
 (start_dialog)
)

(defun SWITCH_ON_OFF (/ IMLST IMREF SLDNAM)
 (if (= IMNUM nil)(setq IMNUM 0))
 (setq IMLST (list "layon" "layonoff" "layoff"))
 (setq IMREF "onoff")
 (setq SLDNAM (nth IMNUM IMLST)
       IMNUM  (1+ IMNUM)
 )
 (if (> IMNUM 2)(setq IMNUM 0))
 (set_images IMREF SLDNAM)
)

(defun SWITCH_LOCK_UNLOCK (/ LIMLST LIMREF SLDNAM)
 (if (= LIMNUM nil)(setq LIMNUM 0))
 (setq LIMLST (list "laylock" "laylockunlock" "layunlock"))
 (setq LIMREF "lockunlock")
 (setq SLDNAM (nth LIMNUM LIMLST)
       LIMNUM  (1+ LIMNUM)
 )
 (if (> LIMNUM 2)(setq LIMNUM 0))
 (princ "\nLimref: ")
 (princ LIMREF)
 (print SLDNAM)
 (princ "\n")
 (set_images LIMREF SLDNAM)
)

(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)
)
This is the associated IMAGE4.DCL Dialog control file

Code:
image_dia : dialog {
 : row {
   :image_button {         
     key          = "onoff";
     width        = 6;
     height       = 3; 
     fixed_width  = true;
     fixed_height = true;
   }       
   :image_button {         
     key          = "lockunlock";
     width        = 6;
     height       = 3;
     fixed_width  = true;
     fixed_height = true;
   }      
 } 
  ok_only;
}
Oh when you run the routine... Click on the ICON (slide image) buttons and watch the ICONS change.

Peter Jamtgaard
Attached Files
File Type: zip ImageSlides.zip (68.0 KB, 24 views)
peter is offline   Reply With Quote
Old 2004-07-05, 05:20 PM   #6
jrd.chapman
Member
 
jrd.chapman's Avatar
 
Join Date: 2000-11
Location: Ontario, Canada
Posts: 49
jrd.chapman is going the right wayjrd.chapman is going the right wayjrd.chapman is going the right wayjrd.chapman is going the right way
Default RE: DCL - Embedding an image (logo) in a dialog

Thanks to Peter and williams.60073 for their comments. Very helpful and much appreciated!

Thanks again!
John D. Chapman
jrd.chapman is offline   Reply With Quote
Reply


Go Back   AUGI Forums > AUGI Technical (English) > Programming > AutoLISP

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Keyboard Shortcuts to Dialog Boxes Scott Hopkins Revit Architecture "Original" Wish List (Archived) 8 2007-04-20 04:54 PM
Image Status - Unreadable gwlittle1 Land Desktop - General 6 2004-06-11 06:06 AM
MTEXT dialog stelthorst AutoCAD LT - General 1 2004-06-08 07:07 PM
Using image files as textures sbrown Revit Architecture - Tips & Tricks 2 2003-10-30 08:12 AM
Image of The Week czoog Announcements 1 2003-05-23 03:51 PM


All times are GMT +1. The time now is 03:02 PM.