Author Topic: How to type CAD command without spacebar?  (Read 5118 times)

0 Members and 1 Guest are viewing this topic.

aaa120

  • Guest
How to type CAD command without spacebar?
« on: November 27, 2011, 12:44:11 AM »
when I type "L"(line command ) ,CAD will type spacebar after "L"
How to make "L" instead of "L+spacebar"?

aaa120

  • Guest
Re: How to type CAD command without spacebar?
« Reply #1 on: November 27, 2011, 12:47:16 AM »
I hate to press spacebar everytime after I press "L" key 

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: How to type CAD command without spacebar?
« Reply #2 on: November 27, 2011, 01:09:11 AM »

Your analysis of the process is incorrect.

When you type 'L' at the command line AutoCAD does not know what to do untill you press either ENTER or SPACEBAR ... at that time AutoCAD reads the complete text entered ( in this case a single 'L" ) and interprets the text.

Imagine if you wanted to run the command L A Y E R ... without the ENTER or SPACEBAR AutoCAD would not be able ro run this command ...


The closest I can imagine to your wish is a toolbar button. A single click will run the macro behind the button.


Regards

kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

jaydee

  • Guest
Re: How to type CAD command without spacebar?
« Reply #3 on: November 27, 2011, 01:39:06 AM »
Something like this might be possible using grread.
If you run this IncAtt lisp from pBe and and user input option part is do without enter/space bar.

Quote from pBe and the link http://www.theswamp.org/index.php?topic=39739.msg450543#msg450543
Have time to write one:

Code: [Select]
(defun c:IncAtt ( / *IntGet1 AddTonth Mr parse gr g1 g2 nVal att)
(vl-load-com) 
(defun *IntGet1 (fn msg)
   (initget 1)
   (setq val ((eval fn) msg))
   (if (eq val "")
   (progn
     (princ "Null Input Try again")
   (*IntGet1 fn msg)))
  val     
  )
(defun AddTonth (str num val / stl orgstr attEnt)
  (setq str (strcat  "" str))
  (if (and (setq stl (parse (reverse (vl-string->list str))))
    (setq orgstr  (nth (1- num) stl)))
    (substr
    (vl-string-subst (strcat (substr orgstr 1 1)(itoa
( + (atoi (substr orgstr 2)) val)))
  orgstr str) 2)
        )
  )
(defun parse (lst / a b c pr d)
  (while (setq a (car lst))
    (setq b (cdr lst))
    (if (and
      (>= a 48)
      (<= a 57))
      (setq c (cons a c))
(if c  (setq d (append  (list (cons (car lst) c)) d ) c nil))
  )
    (setq lst b))
  (mapcar 'vl-list->string d)
  )
(setq MR nil)
  (while (null Mr)
  (princ (strcat "\nSelected Tag: "
(if (or (null att)
(/= (cdr (assoc 0 (entget att))) "ATTRIB"))
"None" (cdr (assoc 2 (entget att))))
"\tInteger position: "
(itoa (if (null pst) (setq pst 1) pst))
"\tIncrement Value:  "
(itoa (if (null val) (setq val 1) val))
"\nSelect texts or [Position/Value]<Enter when done:\n"
)
)
(setq gr (grread nil 14 2)
                  g1 (car  gr)
                  g2 (cadr gr)
            )
(cond
                   ((and (= 2 g1)
(member g2 '(118 86 )))
    (setq val (*IntGet1 'Getint "\nEnter Increment Value: ")))
   ((and (= 2 g1)
(member g2 '(112 80 )))
    (setq pst (*IntGet1 'Getint "\nEnter Integer Position: ")))
   ((= 3 g1)
        (if (and (setq att (car (nentselp g2)))
(eq (cdr (assoc 0 (entget att))) "ATTRIB"))
(vla-put-TextString (vlax-ename->vla-object att)
(if (setq nVal (AddTonth (cdr (assoc 1 (entget att))) pst val))
  nVal (cdr (assoc 1 (entget att)))))
  (princ "\nNone Selected and/or No Integer Found\n"))
    )
   ((and (= 2 g1)
(member g2 '(32 13 )))(setq Mr T)
    )
)
)
(princ)
)

Hope this helps

Tharwat

  • Swamp Rat
  • Posts: 707
  • Hypersensitive
Re: How to type CAD command without spacebar?
« Reply #4 on: November 27, 2011, 02:06:57 AM »
Hi.

You can adjust your mouse ( right click button ) from the command option -> right click customization which would allow you to use mouse instead of pressing Enter or SpaceBar  .

See the link for more help ..

http://docs.autodesk.com/ACD/2011/ENU/filesACR/WS1a9193826455f5ffa23ce210c4a30acaf-4968.htm


Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: How to type CAD command without spacebar?
« Reply #5 on: November 27, 2011, 02:10:10 AM »
I have a theory that software engineering is one of the few industries that are concerned with turning money into time - by spending money we (supposedly) save other people time by automating processes they'd otherwise have to do by some other means that would take them longer. (Concorde flight crews are another.)

The trouble with the theory is that the processes we automate are far too often unnecessary anyway...



Regards
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: How to type CAD command without spacebar?
« Reply #6 on: November 27, 2011, 03:40:22 AM »


I hate to press spacebar everytime after I press "L" key 

I this a preference or is there another reason you hate SPACEBAR ?

Did you know that if the last command was LINE you can press ENTER or SPACEBAR to re-run the last command .. without pressing 'L' again ?

Regards
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

qjchen

  • Bull Frog
  • Posts: 285
  • Best wishes to all
Re: How to type CAD command without spacebar?
« Reply #7 on: November 27, 2011, 05:17:59 AM »
when I type "L"(line command ) ,CAD will type spacebar after "L"
How to make "L" instead of "L+spacebar"?

You can use extra tools to do this.
Like Autohook, or AutoHotkey.
http://qjchen.mjtd.com
My blog http://chenqj.blogspot.com (Chinese, can be translate into English)

aaa120

  • Guest
Re: How to type CAD command without spacebar?
« Reply #8 on: November 27, 2011, 06:33:57 AM »
when I type "L"(line command ) ,CAD will type spacebar after "L"
How to make "L" instead of "L+spacebar"?

You can use extra tools to do this.
Like Autohook, or AutoHotkey.

哈哈哈  你是中国人呀

Ketxu

  • Newt
  • Posts: 109
Re: How to type CAD command without spacebar?
« Reply #9 on: November 28, 2011, 02:37:09 AM »
@aaa120 : how autoCAD can understand what you want, L or Li Le La .... if you don't wanna give him your decision ? I think you need 0.1s to press Space by left thumb only, don't be too lazzy  :ugly:

Chris

  • Swamp Rat
  • Posts: 547
Re: How to type CAD command without spacebar?
« Reply #10 on: November 28, 2011, 08:25:33 AM »
If you really dont want to press spacebar, in 2012, with dynamic input, you can type L, then wait a little bit, and the command complete will pop up, and you can click on Line. but it is much faster to hit L+enter or L+spacebar
Christopher T. Cowgill, P.E.
AEC Collection 2020 (C3D)
Win 10