Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Command ALIAS editing during drawing session 2

Status
Not open for further replies.

cfee

Industrial
Apr 22, 2002
491
0
0
US
Remember the old "BONUS" menus circulated w/ ACAD r14? One of my favorite features was the ability to select editing Command ALIASes from a pull-down menu inside an actice drawing editing session. Is there a corresponding function in r2000i? How about Sustem Variables editor, too?
** I'm fully aware of the ability to edit PGP files using notepad in Windows. However, this facility seems disabled here, as an important edit failed to take effect when I "REINIT"ed the PGP file. Also, a variable I wanted to edit didn't appear in the online help, so I had to come here for a variable name. (Thanks again, FM)
Thanks-
C.F.
 
Replies continue below

Recommended for you

I have the bonus tool to run alias editor as a zip. I tried running it alone and it works. Just give me an email address and I can send it to you.

BU
 
BU: Thanks. That'll be a big help. Any suggestion on the Variables editor also in r-14/Bonus? Didn't I hear a rumor that the "Bonus" functions were planned to be included inside future (after r14) releases? Any Thoughts?

Thanks again,
C.F.
 
I know that they have discontinued free distribution of the bonus (express) tools, after ACAD 2000i I believe. You can still buy them or get them if you have a subscription to their software. You can also get them to work with ACAD 2002. I will send the sys variable ARX also. Just make sure that the .dat and .dll for it is in a ACAD search path. You start it with SYSVDLG at the command line.

BU
 
I have customized the Command Aliases in the past. Now I would like to change the Alias for Object Snap like Center,
Endpoint, Midpoint etc. Can anybody tell me, how these can be modified?

Thanks,
R.S.
 
I am running AutoCAD2000, 2004 soon. I would like to type I instead of INT, C instead of CEN etc. The function keys sound like a very good idea too.
R.S.
 
ok in your custom "481632.mnu" under the accelerators section (all the way down in notepad) dump these at the end save and reload...make a copy of your custom toolbars first and put them into a different directory reload your menu "and yes replace all" close acad. move your saved toolbars back to their correct location and you have it.

here is what i have set up for my function keys.. note if you use snap and that sort that are standards you can still use those w/ a shift+f8.

["F1"]Per
["F2"]Mid
["F3"]End
["F4"]Int
[SHIFT+"F4"]App
["F5"]Nod
["F11"]Cen
["F12"]Qua
[SHIFT+"F12"]Tan
 
There is always another way. I modified my acad.lsp file to override the pgp file as follows:

;
(DEFUN C:C () (COMMAND "OSNAP" "CEN") (PRINC)) ; Osnap Center
;
(DEFUN C:CM () (COMMAND "OSNAP" "CEN,MID") (PRINC)) ; Osnaps CEN and MID
;
(DEFUN C:E () (COMMAND "OSNAP" "ENDP") (PRINC)) ; OSnap END
;
(DEFUN C:EC () (COMMAND "OSNAP" "END,CEN") (PRINC)) ; OSnap END, CEN
;
(DEFUN C:EI () (COMMAND "OSNAP" "INT,END") (PRINC)) ; OSnap INT, END
;
(DEFUN C:EM () (COMMAND "OSNAP" "END,MID") (PRINC)) ; Osnap END, MID
;
(DEFUN C:EQ () (COMMAND "OSNAP" "END,QUA") (PRINC)) ; OSnap END, QUA
;
(DEFUN C:I () (COMMAND "OSNAP" "INT") (PRINC)) ; OSnap INT
;
(DEFUN C:M () (COMMAND "OSNAP" "MID") (PRINC)) ; OSnap MID
;
(DEFUN C:N () (COMMAND "OSNAP" "NONE") (PRINC)) ; OSnap NONE
;
(DEFUN C:NE () (COMMAND "OSNAP" "NEA") (PRINC)) ; OSnap NEAR
;
(DEFUN C:NO () (COMMAND "OSNAP" "NOD") (PRINC)) ; OSnap NODE
;
(DEFUN C:Q () (COMMAND "OSNAP" "QUA") (PRINC)) ; OSnap QUA
;
(DEFUN C:QC () (COMMAND "OSNAP" "QUICK,CEN") (PRINC)) ; OSnap Quick CEN
;
(DEFUN C:QE () (COMMAND "OSNAP" "QUA,END") (PRINC)) ; OSnap Quick END
;
(DEFUN C:QEI () (COMMAND "OSNAP" "QUICK,INT,ENDP") (PRINC)) ; OSnap Quick END, INT
;
(DEFUN C:QES () (COMMAND "OSNAP" "QUICK,ENDP,INS") (PRINC)) ; OSnap Quick END, INS
;
(DEFUN C:QI () (COMMAND "OSNAP" "QUICK,INT") (PRINC)) ; OSnap Quick INT
;
(DEFUN C:QQ () (COMMAND "OSNAP" "QUICK,QUA") (PRINC)) ; OSnap Quick QUA
;
(DEFUN C:QM () (COMMAND "OSNAP" "QUICK,MID") (PRINC)) ; OSnap Quick MID
;
 
IFRs,

Could you expand on this a little? I have used macros, but haven't done any LISP programming. Would I copy this to my acad2000.lsp file? Does it replace CEN with C etc.?

Thanks,
R.S.
 
You copy this into your acad.lsp file.
It defines new commands.
After you copy it into the acad.lsp file (put it at the end) start Autocad and your new commands should be ther.

Type "C" to set the OSNAP to CEN, etc.

This is not used in the middle of a command like "LINE" but before the LINE command to set the OSNAPs.

The OSNAPs will stay what you set them to until you change them again.

Each one has a DEFUN which means define function and after that there is a C: which means autocad keeps it in memory, then the name of the function. For example, "DEFUN C:N ()" defines a new function called "N" with no variables [ the empty () ]. What comes after are the commands that make up the function. These are very short, just setting OSNAPs. The word "COMMAND" tells autocad that what follows is just as if you typed it yourself. The "PRINC" at the end just tells Autocad not to say anything when the command is run. The stuff after the ";" is a comment.

You could also save it as a new file, like "Snaps.lsp" and then in autocad "LOAD" it using the menu pulldown or the "LOAD" command on the command line. The full command line would be (load "Snaps"), of course, the file would have to be saved in a place that Autocad looks in (see Preferences or Options).
 
Another way to set osnaps is to use the Ctrl-Right-CLick mouse button. This can be done in the middle of drawing an entity and can set the snap temporarily or permenantly.

Here is another Pop0 menu fragment that enhances (IMHO) the Ctrl-Right-Click menu. Replace your Pop0 section with this. Try the new ctrl-right-click options!!

***POP0
**P0main
[Osnap]
[Zoom E]'Zoom E
[Zoom P]'Zoom P
[Zoom W]'Zoom W
[Pan]'Pan
[Set Osnaps]$p0=P0Osnaps $p0=*
[--]
[Non 0,0]_non 0,0
[@0,0]@0,0
[From]_from
ID_Tracking [Temporary trac&k point]_tt
[--]
[$(if,$(and,$(getvar,osmode),4),!.)CENter]_center
[$(if,$(and,$(getvar,osmode),1),!.)ENDpoint]_endp
[$(if,$(and,$(getvar,osmode),64),!.)INSert]_ins
[$(if,$(and,$(getvar,osmode),32),!.)INTersection]_int
[$(if,$(and,$(getvar,osmode),2048),!.)ApparantINT]_appint
[$(if,$(and,$(getvar,osmode),2),!.)MIDpoint]_mid
[$(if,$(and,$(getvar,osmode),512),!.)NEArest]_nea
[$(if,$(and,$(getvar,osmode),8),!.)NODe]_nod
[$(if,$(and,$(getvar,osmode),8192),!.)PARa]_par
[$(if,$(and,$(getvar,osmode),128),!.)PERpendicular]_per
[$(if,$(and,$(getvar,osmode),16),!.)QUAdrant]_qua
[$(if,$(and,$(getvar,osmode),256),!.)TANgent]_tan
[$(if,$(=,0,$(getvar,osmode)),!.)NONe]_non
[--]
[.X].X
[.Y].Y
[.Z].Z
[.XY].XY
[.XZ].XZ
[.YZ].YZ
[--]
[Calculator]'cal

**P0Osnaps
[Snaps]
[Goto Dwg ]$p0=P0Main
[Pop 0]$p0=P0Main $p0=*
[--]
[Non]'setvar osmode 0 $p0=P0Main
[--]
[Add Snaps ]
[$(if,$(and,$(getvar,osmode),4),!.) CENter]'setvar osmode (+ (getvar "osmode") 4) $p0=P0Osnaps $p0=*
[$(if,$(and,$(getvar,osmode),1),!.) ENDpoint]'setvar osmode (+ (getvar "osmode") 1) $p0=P0Osnaps $p0=*
[$(if,$(and,$(getvar,osmode),64),!.) INSert]'setvar osmode (+ (getvar "osmode") 64) $p0=P0Osnaps $p0=*
[$(if,$(and,$(getvar,osmode),32),!.) INTersection]'setvar osmode (+ (getvar "osmode") 32) $p0=P0Osnaps $p0=*
[$(if,$(and,$(getvar,osmode),2048),!.) ApparantINT]'setvar osmode (+ (getvar "osmode") 2048) $p0=P0Osnaps $p0=*
[$(if,$(and,$(getvar,osmode),2),!.) MIDpoint]'setvar osmode (+ (getvar "osmode") 2) $p0=P0Osnaps $p0=*
[$(if,$(and,$(getvar,osmode),512),!.) NEArest]'setvar osmode (+ (getvar "osmode") 512) $p0=P0Osnaps $p0=*
[$(if,$(and,$(getvar,osmode),8),!.) NODe]'setvar osmode (+ (getvar "osmode") 8) $p0=P0Osnaps $p0=*
[$(if,$(and,$(getvar,osmode),128),!.) PERpendicular]'setvar osmode (+ (getvar "osmode") 128) $p0=P0Osnaps $p0=*
[$(if,$(and,$(getvar,osmode),16),!.) QUAdrant]'setvar osmode (+ (getvar "osmode") 16) $p0=P0Osnaps $p0=*
[$(if,$(and,$(getvar,osmode),256),!.) TANgent]'setvar osmode (+ (getvar "osmode") 256) $p0=P0Osnaps $p0=*
[--]
[Remove Snaps ]
[$(if,$(and,$(getvar,osmode),4),!.) CENter]'setvar osmode (- (getvar "osmode") 4) $p0=P0Osnaps $p0=*
[$(if,$(and,$(getvar,osmode),1),!.) ENDpoint]'setvar osmode (- (getvar "osmode") 1) $p0=P0Osnaps $p0=*
[$(if,$(and,$(getvar,osmode),64),!.) INSert]'setvar osmode (- (getvar "osmode") 64) $p0=P0Osnaps $p0=*
[$(if,$(and,$(getvar,osmode),32),!.) INTersection]'setvar osmode (- (getvar "osmode") 32) $p0=P0Osnaps $p0=*
[$(if,$(and,$(getvar,osmode),2048),!.) ApparantINT]'setvar osmode (- (getvar "osmode") 2048) $p0=P0Osnaps $p0=*
[$(if,$(and,$(getvar,osmode),2),!.) MIDpoint]'setvar osmode (- (getvar "osmode") 2) $p0=P0Osnaps $p0=*
[$(if,$(and,$(getvar,osmode),512),!.) NEArest]'setvar osmode (- (getvar "osmode") 512) $p0=P0Osnaps $p0=*
[$(if,$(and,$(getvar,osmode),8),!.) NODe]'setvar osmode (- (getvar "osmode") 8) $p0=P0Osnaps $p0=*
[$(if,$(and,$(getvar,osmode),128),!.) PERpendicular]'setvar osmode (- (getvar "osmode") 128) $p0=P0Osnaps $p0=*
[$(if,$(and,$(getvar,osmode),16),!.) QUAdrant]'setvar osmode (- (getvar "osmode") 16) $p0=P0Osnaps $p0=*
[$(if,$(and,$(getvar,osmode),256),!.) TANgent]'setvar osmode (- (getvar "osmode") 256) $p0=P0Osnaps $p0=*
 
Status
Not open for further replies.
Back
Top