Author Topic: Cursor menu - custom  (Read 907 times)

0 Members and 1 Guest are viewing this topic.

like_citrus

  • Mosquito
  • Posts: 15
Cursor menu - custom
« on: April 02, 2020, 08:54:10 AM »
Is there a way to create a custom cursor menu (right-click menu), as shown in the attached image ... not by editing the Customize User interface (CUI) ... but instead editing a file with a text editor.

Apparently the older versions of AutoCAD used a ".mns" file (POP501 may have been the default cursor menu). Now it may be a ".cui" or ".cuix" file ... which may or may not be easy to change using a text editor.

If possible, I would prefer to edit the ".mns" file, using AutoCAD 2013.

Can it be done for a start? If so, how can it be done? For information, I have an equivalent pull-down menu made as follows:


LOAD USING SCRIPT FILE (TEST.scr)
Code: [Select]
(if (and (not (findfile "TEST.mnu"))
(findfile "C:\\Folder1\\POP13 Test\\TEST.mnu")
)
(setenv "ACAD" (strcat (getenv "ACAD") "C:\\Folder1\\POP13 Test"))
)
(command "._MENULOAD" "TEST.mnu")
(menucmd "P13=+TEST.CTOPopTEST")

MENU FILE (TEST/mnu)
Code: [Select]
***MENUGROUP=TEST
***POP13
**CTOPopTEST
[Test]

               [->UC]
                 [310UC158]^C^C-INSERT UniversalColumns_310UC158;scale;1;
                 [310UC137]^C^C-INSERT UniversalColumns_310UC137;scale;1;
                 [310UC118]^C^C-INSERT UniversalColumns_310UC118;scale;1;
                 [310UC96.8]^C^C-INSERT UniversalColumns_310UC96.8;scale;1;

T.Willey

  • Needs a day job
  • Posts: 5237
Re: Cursor menu - custom
« Reply #1 on: April 02, 2020, 10:34:02 AM »
This is more a general Acad question than a lisp one, but the answer is yes, kind of.  I have a custom menu that pops up, but mine is a middle mouse button.  I have used it for years, and the main editing I do is to the mns file.  You can still use one, but when you load it into Acad a cui(x) will be created along side.  If you need to change it, you can use either the cui editor or you can change the mns file and un/re-load the file.  Here is the contents of my mns file:

Quote
//
//      AutoCAD menu file - C:\Custom\custom2.mnc
//

***MENUGROUP=custom2

***AUX1
$M=$(if,$(eq,$(substr,$(getvar,cmdnames),1,5),GRIP_),$P0=ACAD.GRIPS $P0=*);
//$M=$(if,$(wcmatch,$(getvar,cprofile),"*3M"),$P0=custom2.WilleySnapMMM $p0=*,$P0=custom2.WilleySnap $p0=*);
$P0=custom2.WilleySnap $p0=*
^C^C
^B
^O
^G
^D
^E
^T

***POP0
**WilleySnap
[MyMenu]
[Move Orient]^c^cMoveOrient
[Total Length]^c^cTLen
[TOrient]^c^cTOrient
[Distance]^c^cDist
[Circle, 2p]^c^cCircle;2p
[--]
[Next Tab]^c^cNTB
[Previous Tab]^c^cPTB
[--]
//[->Layers]
//   [Freeze]^c^c^c_LayFrez
//   [Off]^c^c^c_LayerOff
//   [--]
//   [Isolate]^c^c^c_IsoLays
//   [UnIsolate]^c^c^c_UnisoLays
//[<-Edit Props by Entity]^c^c^c_EditLayerFromSelection
[->Text/Attribute Routines]
   [Text to MText]^C^C^C_Dt2Mt
   [Space Notes]^C^C^C_SpaceNotes
   [Break Text Inplace]^C^C^C_BreakTextInplace
   [Add Notes to Numbers]^C^C^C_AddNotes
   [Add Numbers to Notes]^C^C^C_NumberNotes
   [Remove From Text]^c^c^c_RemoveFromText
   [Replace in Text]^c^c^c_ReplaceInText
   [--]
   [Move Text/Attributes]^C^C^C_MoveAttText
   [Make Attributes Invisible]^c^c^c_AttInvisible
   [Make Attributes Visible]^c^c^c_AttVisible
   [Scale Attributes]^c^c^c_ScaleAttributes
   [Multi-Attribute Edit]^C^C^C_MATT
   [Change Attribute Style]^c^c^c_ChangeAttStyle
   [Change Atts (per Tag n Value)]^C^C^C_AttUpdate
   [Move Attributes, Default]^C^C^C_AttDftLoc
   [Change Attributes Rotation]^C^C^C_AttRot
[<-Change Attributes Height]^C^C^C_AttHeight
[->Block Routines]
   [Change Block]^C^C^C_cb
   [LineUp Blocks]^C^C^C_LUB
   [Rotate Block Geometry]^c^c^c_RBlkGeometry
   [Change Block Objects to ByLayer]^C^C^C_ChangeBlockByLayer
   [Replace Block]^C^C^C_ReplaceBlock
   [Erase (nested) Block Object]^c^c^c_EraseObjectFromBlock
   [--]
   [Update Atts from Other Dwg]^c^c^c_CopyAttributesFromDrawing
   [Add Extra Attribute]^C^C^C_AddExtraAtt
[<-Copy Attributes to New Block]^C^C^C_CopyAtts
[->Xref Routines]
   [Copy Layer Properties]^c^c^c_CopyXrefLayerProps
   [Check if xrefs will load]^c^c^c_XrefCheck
   [My Xref Manger]^c^c^c_MyXrefManager
   [--]
   [Unload]^C^C_xr-u
   [Reload]^C^C_xr-r
   [Reload (Last one un-Loaded)]^C^C_xr-rt
   [Reload All]^C^C^C_ReloadAllXrefs
   [Unload All]^C^C^C_UnloadAllXrefs
   [Reload Only Loaded]^C^C^C_ReloadLoadedXrefs
   [--]
   [Bind (as Insert)]^C^C_xr-bi
   [Bind (as Bind)]^C^C_xr-bb
   [Detatch]^C^C_xr-d
   [--]
   [Open Drawing]^C^C_xr-open
   [Copy Layer Settings]^C^C_CopyXrefLayerSet
   [Match Color/Linetype to Origianl]^C^C^C_SetOrigLayerProps
   [Change color of all xrefs layers, ObjectDBX]^c^c^c_ChangeXrefsLayerColorMulti
[<-Change layers color]^C^C_xr-c
//[->Drawing Routines]
//   [Next Drawing]^C^C^C_MyNext
//   [Next Drawing Close Current]^C^C^C_MyNextAndCloseCurrent
//   [Previous Drawing]^C^C^C_MyPrevious
//   [Previous Drawing Close Current]^C^C^C_MyPreviousAndCloseCurrent
//   [Active Next Open Drawing]^C^C^C_NextInDocManager
//   [--]
//   [Close All (without saving)]^C^C_CloseAllButActive
//   [Close Select]^C^C_CloseSelect
//[<-Tile Selected Drawings]^C^C_TileSelect
//[->Plotting]
//   [Batch Plot]^c^c^c_MyBPlot
//[<-Quick Publish]^C^C^C_QuickPublish
//[->Zoom Operations]
//   [Zoom Window]'_.zoom;_window
//   [Zoom Previous]'_zoom;_previous
//   [Zoom Extents]'_zoom;_extent
//   [--]
//   [Realtime Zoom]'_zoom;;
//   [Realtime Pan]'_rtpan
//[<-3d Orbit]'_3dOrbit
[--]
[Perpendicular]_per
[Bisect]'bi
[Mid Between 2 Points]_m2p
[->Align]
   [Aling X]'alignx
   [Align Y]'aligny
[<-Align Z]'alignz
[Intersection of Points]'intpoints
[->From]
   [From]_from
   [From X]'fromx
   [From Y]'fromy
[<-From Z]'fromz
[--]
[Edit Properties]^C^C^C(if (not c:EditProps) (load "GrabPropertiesv02.lsp"));_EditProps
//[Match Properties]^C^C_Match

That is most, if not all, the help I can give.  I have not had to set it up in a long time, since I wrote this way back when.  But the top portion of the file is where it makes it available in the cui editor to select it as an option for the middle mouse button.  You might be able to do it for the right-click option, but I have never tried.

Hope it was at least a little helpful.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

MP

  • Seagull
  • Posts: 17653
  • Have thousands of dwgs to process? Contact me.
Re: Cursor menu - custom
« Reply #2 on: April 02, 2020, 11:20:34 AM »
**WilleySnap - consequence of priapism?
Engineering Technologist Programmer Analyst CAD Specialist
Multi-Discipline Design Drafting Document Control Automation.
cadanalyst@gmail.com www.linkedin.com/in/cadanalyst

Lee Mac

  • Seagull
  • Posts: 12379
  • London, England
Re: Cursor menu - custom
« Reply #3 on: April 02, 2020, 02:28:33 PM »
**WilleySnap - consequence of priapism?

 :lol:

T.Willey

  • Needs a day job
  • Posts: 5237
Re: Cursor menu - custom
« Reply #4 on: April 02, 2020, 02:59:02 PM »
**WilleySnap - consequence of priapism?

Nice vocabulary, MP!!  I had to look it up, and now I'm thinking maybe I shouldn't have posed that portion.  Too late now, and not that I'm aware of.  Yet...
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

MP

  • Seagull
  • Posts: 17653
  • Have thousands of dwgs to process? Contact me.
Re: Cursor menu - custom
« Reply #5 on: April 02, 2020, 03:22:27 PM »
Nice vocabulary, MP!! 

Given the stiff competition nice compliment! :lol:

I'm thinking maybe I shouldn't have posed that portion.

Naw man, totally swole! :lol:

:lol:

 :lmao:
Engineering Technologist Programmer Analyst CAD Specialist
Multi-Discipline Design Drafting Document Control Automation.
cadanalyst@gmail.com www.linkedin.com/in/cadanalyst

ronjonp

  • Needs a day job
  • Posts: 7136
Re: Cursor menu - custom
« Reply #6 on: April 02, 2020, 06:22:02 PM »
**WilleySnap - consequence of priapism?
:-D

Windows 10 x64 - AutoCAD /C3D 2020

Custom Build PC

MP

  • Seagull
  • Posts: 17653
  • Have thousands of dwgs to process? Contact me.
Re: Cursor menu - custom
« Reply #7 on: April 02, 2020, 07:32:49 PM »
Random: Your avatar (Ron) has been my fav for more years than I can recall. :-)
Engineering Technologist Programmer Analyst CAD Specialist
Multi-Discipline Design Drafting Document Control Automation.
cadanalyst@gmail.com www.linkedin.com/in/cadanalyst

ronjonp

  • Needs a day job
  • Posts: 7136
Re: Cursor menu - custom
« Reply #8 on: April 03, 2020, 01:03:03 PM »
Random: Your avatar (Ron) has been my fav for more years than I can recall. :-)
Thanks! :) I found a base picture on the interwebs many moons ago and made my tweaks to it ( in AutoCAD of course ).

Windows 10 x64 - AutoCAD /C3D 2020

Custom Build PC

like_citrus

  • Mosquito
  • Posts: 15
Re: Cursor menu - custom
« Reply #9 on: June 19, 2020, 06:09:51 AM »
T.Willey, thanks for your response in post #2, I had not seen it for some reason (3 months ago nearly).
I loaded it using the command "MENULOAD", in the CUI Editor it comes up as COSTOM2 and all the commands show up in the Command List.
However when I click the middle button, I get the "Hand" icon which is for panning, and not your customised menu.
Is there a way to get it to show as the next step?
« Last Edit: June 20, 2020, 02:57:41 AM by like_citrus »

Crank

  • Swamp Rat
  • Posts: 1448
Re: Cursor menu - custom
« Reply #10 on: June 19, 2020, 06:46:20 AM »
Vault Professional 2018     +     AEC Collection

BIGAL

  • Bull Frog
  • Posts: 453
  • 30 + years of using Autocad
Re: Cursor menu - custom
« Reply #11 on: June 19, 2020, 09:10:09 PM »
If your old like me there is the screen menu option it was removed a number of versions ago but it is actually still there it was very nice to do what you want have a submenu pop up of choices. You have to turn it back on trying to remember how its a setvar etc. It would return the contents to say a lisp request like getstring, nicer thing is it has a double entry screen & actual
A man who never made a mistake never made anything

like_citrus

  • Mosquito
  • Posts: 15
Re: Cursor menu - custom
« Reply #12 on: June 20, 2020, 02:56:57 AM »
Crank, this worked and now I can see the menu from post #2 ... now to figure out how to get from right click.
BIGAL, sorry but I can't understand what you mean as I don't have a background on the programming side of AutoCAD. Can you please explain in simpler terms.


VovKa

  • Swamp Rat
  • Posts: 1230
  • Ukraine
Re: Cursor menu - custom
« Reply #14 on: June 22, 2020, 08:23:44 AM »
Is there a way to create a custom cursor menu (right-click menu)
here's an example of custom 'left-click' shortcut menu
https://www.theswamp.org/index.php?topic=32261.0