Jump to content

drawing status bar/tray


yrnomad

Recommended Posts

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

Link to comment
Share on other sites

  • 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

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 2 weeks later...

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

Link to comment
Share on other sites

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