|
|
#1 |
|
Forum Newbie
Using: AutoCAD 2008 Join Date: Nov 2009
Posts: 2
|
ive made some custom buttons and was wondering how to set up a new keyboard command.
so typing a command to start the command instead of clicking on it. Thanks in advance. |
|
|
|
|
|
#2 |
|
Forum Deity
![]() ![]() ![]() ![]() ![]() Using: Civil 3D 2009 Join Date: Sep 2006
Location: Pittsburgh, PA, USA
Posts: 2,566
|
You can just type the command at the command line...
If you want a command alias (shortcut for a command) you can edit your acad.pgp file, easily done by typing Aliasedit at the command line. |
|
|
|
|
|
#3 |
|
Super Member
![]() ![]() ![]() ![]() Using: Civil 3D 2008 Join Date: Dec 2005
Location: GEELONG AUSTRALIA
Posts: 768
|
You can define any command as a different keyboard command we use stuff like "39" sets the osnap "dv" driveway "XFP" cross fall as a percent
You just do little lisps save in autoload etc (defun C:39 () (setvar "osmode" 39) ) I like zzz aaa qqq its easy to get at and unlikely to be used by Autocad. just make them so they run a lisp program etc (defun C:aaa () (load "myprog1") (myprog1) :if it has a defun definition already else leave out ) |
|
|
|
|
|
#4 |
|
Super Member
![]() ![]() ![]() ![]() Using: Civil 3D 2009 Join Date: Apr 2008
Posts: 1,488
|
|
|
Seann: ...it went crazy ex-girlfriend on me...
eric_monceaux...its pretty funny seeing two AutoCAD Gods give each other flak... |
|
|
|
|
|
|
#5 |
|
Forum Newbie
Using: AutoCAD 2008 Join Date: Nov 2009
Posts: 2
|
thx for the responses. i was really hoping i could somehow set a new command without this lisp file. currently i have no idea how to create these files.
I was hoping since it was easy enough to create a macro (new command button) to click on that i could also accompany it with a type command. I noticed i can set hotkeys (ctrl+k for example) but i couldnt make new command lines. If thats the only way to do it ill try to look into lisp files. |
|
|
|
|
|
#6 | |
|
Super Member
![]() ![]() ![]() ![]() Using: Civil 3D 2009 Join Date: Apr 2008
Posts: 1,488
|
Quote:
Maybe something like this: Code:
(defun MacroIt (#Macro) (vl-load-com) (or *AcadDoc* (setq *AcadDoc* (vla-get-activedocument (vlax-get-acad-object)))) (vla-sendcommand *AcadDoc* (vl-princ-to-string #Macro)) ) ;_ defun (defun c:Test1 (/) (MacroIt "-layer set 0\n\n\n") (princ)) (defun c:Test2 (/) (MacroIt "-layer make TEMP\n\n\nline ") (princ)) |
|
|
Seann: ...it went crazy ex-girlfriend on me...
eric_monceaux...its pretty funny seeing two AutoCAD Gods give each other flak... |
||
|
|
|
![]() |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Propertie's Buttons | JONTHEPOPE | AutoCAD General | 4 | 27th Dec 2008 04:46 pm |
| New buttons | quasifun | AutoLISP, VBA, the CUI & Customisation | 1 | 27th Sep 2007 05:28 pm |
| mtext commands for buttons - please help | jwitzel | AutoLISP, VBA, the CUI & Customisation | 6 | 24th Aug 2007 12:44 am |
| Assigning commands to mouse buttons | Siberian | AutoCAD General | 4 | 26th Oct 2006 11:17 am |
| How do you bind commands to stylus buttons??? | luke13 | AutoCAD Drawing Management & Output | 0 | 27th Jul 2005 10:53 pm |