Lee Mac Posted August 24, 2009 Share Posted August 24, 2009 Like this? (defun c:SpkON ( ) (vl-load-com) (if (not *spk*) (progn (setq *spk* (vlr-command-reactor nil (list (cons :vlr-CommandWillStart 'Speak)))) (princ "\n<< Reactor Initiated >>")) (princ "\n<< Reactor Already Running >>")) (princ)) (defun Speak (Reac Args / Vce) (if (not (wcmatch (strcase (car Args)) "PAN,ZOOM")) (progn (setq Vce (vlax-create-object "Sapi.SpVoice")) (vlax-invoke Vce "Speak" (strcat (car Args) " commmand started") 0) (vlax-release-object Vce))) (princ)) (defun c:SpkOFF ( ) (if (and *spk* (vlr-added-p *spk*)) (progn (vlr-remove *spk*) (setq *spk* nil)) (princ "\n<< Reactor Not Running >>")) (princ)) Quote Link to comment Share on other sites More sharing options...
gile Posted August 24, 2009 Share Posted August 24, 2009 It is possible to get AutoCAD to 'speak' to the user Yes, it's possible Here's a `bad joke': (or *BadJoke* (setq *BadJoke* (vlr-command-reactor nil '((:vlr-commandWillStart . BadJokeCallBack)) ) ) ) (defun BadJokeCallBack (rea cmd) (setq sapi (vlax-create-object "Sapi.SpVoice")) (vlax-invoke sapi "Speak" (car cmd) 0) (vlax-release-object sapi) ) I'm too newbie in this forum to be allowed to give you the link to a long thread at TheSwamp, but you can search in the LISP forum for "Patrick_35 speak". Quote Link to comment Share on other sites More sharing options...
MarcoW Posted August 24, 2009 Share Posted August 24, 2009 haha - you just want something to impress your colleagues Well, I'm not sure there are many things that aren't obvious, but I suppose you could change the setting of the sys var: MTJIGSTRING Not only for impressing... when one is drawing 5 days a week it's nice to mess around with the tools. Quote Link to comment Share on other sites More sharing options...
gile Posted August 24, 2009 Share Posted August 24, 2009 When you'll be bored to heard `Sapi', just launch: (vlr-remove *BadJoke*) (setq *BadJoke* nil) Quote Link to comment Share on other sites More sharing options...
MarcoW Posted August 24, 2009 Share Posted August 24, 2009 @ Lee: That's what I meant, fun with talking autocad... I'll sneaky enhance my collegues autocad... like to see the face! @ Gile: I can't follow your code, is the routine complete? When I was new I had the same prob with adding links or sending PM. Maybe you can explain where to search? Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted August 24, 2009 Share Posted August 24, 2009 Gile's code is almost identical to mine - except that his creates the reactor upon loading and one needs to manually disarm it. Quote Link to comment Share on other sites More sharing options...
gile Posted August 24, 2009 Share Posted August 24, 2009 @ Gile:I can't follow your code, is the routine complete? When I was new I had the same prob with adding links or sending PM. Maybe you can explain where to search? As I said, it's just a `bad joke' if you copy/paste the code #42 to the command line of somebody in your office. He (or you) should have to copy/paste the code #44 to stop AutoCAD announcing every command he launches. You can find the trhead I said in the LISP forum of TheSwamp searching for "Patrick_35 speak". Or maybe Lee post the link... Lee, I didn't saw your post before posting mine, sorry... Quote Link to comment Share on other sites More sharing options...
alanjt Posted August 24, 2009 Share Posted August 24, 2009 macro, if you look at post #10, you will see where i posted many options for the modemacro. Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted August 24, 2009 Share Posted August 24, 2009 As I said, it's just a `bad joke' if you copy/paste the code #42 to the command line of somebody in your office.He (or you) should have to copy/paste the code #44 to stop AutoCAD announcing every command he launches. You can find the trhead I said in the LISP forum of TheSwamp searching for "Patrick_35 speak". Or maybe Lee post the link... Lee, I did saw your post before posting mine, sorry... Not a problem Gile Here is the link: http://www.theswamp.org/index.php?topic=14549.0 Quote Link to comment Share on other sites More sharing options...
mdbdesign Posted September 3, 2009 Share Posted September 3, 2009 Command: -VIEW Enter an option [?/Orthographic/Delete/Restore/Save/Ucs/Window]: O Enter an option [Top/Bottom/Front/BAck/Left/Right]: What will be Diesel macro to display current view i.e: Top/Bottom/Front/BAck/Left/Right in bottom corner screen beside: text size, dim scale etc.? Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted September 3, 2009 Share Posted September 3, 2009 Perhaps: $(getvar,ucsname) Quote Link to comment Share on other sites More sharing options...
alanjt Posted September 3, 2009 Share Posted September 3, 2009 Perhaps: $(getvar,ucsname) view and ucs are two different things. Quote Link to comment Share on other sites More sharing options...
mdbdesign Posted September 3, 2009 Share Posted September 3, 2009 Lots of kisses. work!!! Maybe I exchange kisses for beer instead - work better between men. Thanks anyway. Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted September 4, 2009 Share Posted September 4, 2009 view and ucs are two different things. Yes, but it should display the TOP/RIGHT etc as needed ... a workaround, I know :wink: Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted September 4, 2009 Share Posted September 4, 2009 Lots of kisses. work!!!Maybe I exchange kisses for beer instead - work better between men. Thanks anyway. I'll take the beer thanks... Quote Link to comment Share on other sites More sharing options...
alanjt Posted September 4, 2009 Share Posted September 4, 2009 Yes, but it should display the TOP/RIGHT etc as needed ... a workaround, I know :wink: good point and good idea. Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted September 4, 2009 Share Posted September 4, 2009 good point and good idea. Thanks AJ Quote Link to comment Share on other sites More sharing options...
alanjt Posted September 4, 2009 Share Posted September 4, 2009 Thanks AJ [ATTACH]14191[/ATTACH] mmm, that sounds lovely. 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.