Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Right Click Menu

Status
Not open for further replies.

AlexDring

Mechanical
Dec 31, 2002
117
Can I change my right click menus or context senstive menus using lisp? Something like if I preselected a text and right click I get a custom menu that I create just for text operations? Like drawing a line and right clicking and getting the osnaps?
 
Replies continue below

Recommended for you

You can change the right click action by changing the Menu file. I've never tried using LISP to change it on the fly, but you could try using COMMAND "MENULOAD" to load a partial menu including the ***POP0 fragment. My right click menu is as follows:

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

Part and Inventory Search

Sponsor