Jump to content

Recommended Posts

Posted

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

  • Replies 57
  • Created
  • Last Reply

Top Posters In This Topic

  • Lee Mac

    22

  • alanjt

    12

  • MarcoW

    7

  • StevJ

    5

Top Posters In This Topic

Posted Images

Posted
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".

Posted
haha - you just want something to impress your colleagues :D

 

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.

Posted

When you'll be bored to heard `Sapi', just launch:

(vlr-remove *BadJoke*)
(setq *BadJoke* nil)

Posted

@ 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?

Posted

Gile's code is almost identical to mine - except that his creates the reactor upon loading and one needs to manually disarm it. :)

Posted
@ 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...

Posted

macro, if you look at post #10, you will see where i posted many options for the modemacro.

Posted
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 8)

 

Here is the link:

http://www.theswamp.org/index.php?topic=14549.0

  • 2 weeks later...
Posted

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.?

Posted
Perhaps:

 

$(getvar,ucsname)

 

view and ucs are two different things.

Posted

Lots of kisses. work!!!:shock:

Maybe I exchange kisses for beer instead - work better between men.:)

Thanks anyway.

Posted
view and ucs are two different things.

 

Yes, but it should display the TOP/RIGHT etc as needed ... a workaround, I know :wink:

Posted
Lots of kisses. work!!!:shock:

Maybe I exchange kisses for beer instead - work better between men.:)

Thanks anyway.

 

 

I'll take the beer thanks... o:)

Posted
Yes, but it should display the TOP/RIGHT etc as needed ... a workaround, I know :wink:

good point and good idea.

Posted
Thanks AJ [ATTACH]14191[/ATTACH]

mmm, that sounds lovely.

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...