View Full Version : A picture in an alert box?
dfuehrer
2007-07-12, 03:03 PM
Is it possible to place a picture inside of am AutoCAD alert box?
Don
thechinaman
2007-07-12, 05:38 PM
I don't know, but tell me if you find out how....
Is it possible to place a picture inside of am AutoCAD alert box?
Don
Adesu
2007-07-13, 01:52 AM
Is it possible to place a picture inside of am AutoCAD alert box?
Don
Hi dfuehrer,
do you mean like this
; sci is stand for Sample Create Icon
; Design by : Adesu <Ade Suharna>
; Email : mteybid@yuasabattery.co.id
; Homepage : http://www.yuasa-battery.co.id
; Create : 18 December 2006
; Program no.: 0496/12/2006
; Edit by : Jeff Mishler 18/12/2006 1).
(defun clfp (lst / ?lst alst cnt div len xlst)
(setq len (length lst)) ; 232
(setq div (/ len 4)) ; 58
(setq cnt 0)
(repeat
div
(setq xlst (list (nth cnt lst)
(nth (setq cnt (1+ cnt)) lst)
(nth (setq cnt (1+ cnt)) lst)
(nth (setq cnt (1+ cnt)) lst)
)) ; (2 12 2 19)
(setq ?lst (append ?lst (list xlst))) ; ((2 12 2 19)....etc)
(setq cnt (1+ cnt))
) ; repeat
?lst
) ; defun
(defun c:sci (/ dcl_id ans)
(setq dcl_id (load_dialog "Sample Create Icon.DCL"))
(if
(not (new_dialog "sci" dcl_id))
(exit)
) ; if
(setq lst '(2 12 2 19 3 9 3 22 4 23 4 8 5 6 5 25 6 26 6
5 7 5 7 26 8 27 8 4 9 3 9 28 10 28 10 3 11 3
11 28 12 29 12 2 13 2 13 29 14 29 14 2 15 2
15 29 16 29 16 2 17 2 17 29 18 29 18 2 19 2
19 29 20 28 20 3 21 3 21 28 22 28 22 3 23 4
23 27 24 26 24 5 25 5 25 26 26 25 26 6 27 8
27 23 28 22 28 9 29 19 29 12))
;7 28 8 29 14 32 21 32 10 30 11 30 11 31))
;24 31 25 30 20 30 27 29 23 29 24 28 28 28
;29 27 26 27 27 26 29 26 29 23 28 24 28 25
;30 20 30 25 31 24 31 11 30 11 30 10 32 21
;32 14 28 7
;7 28 8 29 14 32 21 32 10 30 11 30 11 31
;24 31 25 30 20 30 27 29 23 29 24 28 28 28
;29 27 26 27 27 26 29 26 29 23 28 24 28 25
;30 20 30 25 31 24 31 11 30 11 30 10 32 21
;32 14 28 7))
(setq blst (clfp lst)) ; ((2 12 2 19) (3 9 3 22) (4 23 4 8) (5 6 5 25)....etc
(start_image "temp")
(mapcar '(lambda (x) ; 1).
(vector_image (car x)(cadr x)(caddr x)(cadddr x) 1)
) ; lambda
blst
) ; mapcar
(end_image)
(setq ans (start_dialog))
(unload_dialog dcl_id)
(princ)
) ; defun
krispy5
2007-07-13, 04:02 AM
Try this for the default images:
;|
**BUTTONS**
vbOKOnly 0 Display OK button only.
vbOKCancel 1 Display OK and Cancel buttons.
vbAbortRetryIgnore 2 Display Abort, Retry, and Ignore buttons.
vbYesNoCancel 3 Display Yes, No, and Cancel buttons.
vbYesNo 4 Display Yes and No buttons.
vbRetryCancel 5 Display Retry and Cancel buttons.
**IMAGE**
vbCritical 16 Display Critical Message icon.
vbQuestion 32 Display Warning Query icon.
vbExclamation 48 Display Warning Message icon.
vbInformation 64 Display Information Message icon.
**DEFAULT**
vbDefaultButton1 0 First button is default.
vbDefaultButton2 256 Second button is default.
vbDefaultButton3 512 Third button is default.
vbDefaultButton4 768 Fourth button is default.
**MODALITY**
vbApplicationModal 0 Application modal
vbSystemModal 4096 System modalvbMsgBoxHelpButton 16384 Adds Help button to the message box
VbMsgBoxSetForeground 65536 Specifies the message box window as the foreground window
vbMsgBoxRight 524288 Text is right aligned
vbMsgBoxRtlReading 1048576 Specifies text should appear as right-to-left reading on Hebrew and Arabic systems
add one number from each group
|;
(defun c:myalert(/ alertstring message title buttons image default modality options)
(setq
message "My message goes here."
title "My Title goes here."
buttons 1
image 48
default 0
modality 0
options (+ buttons image default modality)
;alertstring (strcat "Msgbox \"" message "\", " (itoa options) ", \"" title "\"")
alertstring (strcat "ThisDrawing.SetVariable \"USERI1\", MsgBox(\"" message "\", " (itoa options) ", \"" title "\")")
;thisdrawing.setvariable "USERI1", MsgBox("test", vbYesNo)
);end setq
(command ".vbastmt" alertstring)
(princ)
);end defun
vBulletin® v3.6.7, Copyright ©2000-2010, Jelsoft Enterprises Ltd.