(defun c: run ( / )
(c:work1)
make sound . . .
(c:work2)
make sound . . .
(c:work3)
make sound . . .
(princ))
(acet-sys-beep 16)
(defun Speak (txt / sapi)
;from user sea.haven @ https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/usb-flash-drive-serial-number/m-p/9631481#M402295
;txt - string, of text to have computer speak
(if (eq (type txt) 'STR)
(progn
(setq sapi (vlax-create-object "Sapi.SpVoice"))
(vlax-put sapi 'SynchronousSpeakTimeout 1)
(vlax-invoke-method sapi 'WaitUntilDone 0)
(vlax-invoke sapi "Speak" txt 0)
(vlax-release-object sapi)
);progn
);if
(princ)
);defun
(Speak "Program Complete.")
(speak "You have been changed to DCE Standards please restart Autocad")
or
(speak "You have been changed to DCE Standards")
(speak "please restart Autocad")
(if (not speak)(Load "text to voice"))
Mohan,Yes, Express Tools is installed, thank you guys
Do you have Express Tools installed?
If so, you can use:Code: [Select](acet-sys-beep 16)
https://www.cadsta.com/CADSTA-Tools-(acet-sys-beep).html (https://www.cadsta.com/CADSTA-Tools-(acet-sys-beep).html)
Best,
~DD
You may need 2 lines or remove the \n's, 2 lines or more will do a pause between lines.Code: [Select](speak "You have been changed to DCE Standards please restart Autocad")
or
(speak "You have been changed to DCE Standards")
(speak "please restart Autocad")
If you dont want the text to voice lisp in your code save to a support path then only need.Code: [Select](if (not speak)(Load "text to voice"))
PS from sea.haven
(cond
((= (getvar 'LOGINNAME) "Lg0123")(setq uname "Lonnie"))
((= (getvar 'LOGINNAME) "BR0123")(setq uname "Barney Rubble"))
((= (getvar 'LOGINNAME) "FF0123")(setq uname "Fred Flinstone"))
)
(speak (strcat "hello " uname "You have been upgraded to the DCE Standards. Please restart Autocad. Thank you."))
Use a cond and then full name our (getenv "username") was 2 letters and a number.@Bigal ... no need to set 'uname' for each entry:Code: [Select](cond
((= (getvar 'LOGINNAME) "Lg0123")(setq uname "Lonnie"))
((= (getvar 'LOGINNAME) "BR0123")(setq uname "Barney Rubble"))
((= (getvar 'LOGINNAME) "FF0123")(setq uname "Fred Flinstone"))
)
(speak (strcat "hello " uname "You have been upgraded to the DCE Standards. Please restart Autocad. Thank you."))
Good to know about "." = pause.