TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: alanjt on December 09, 2016, 06:38:27 PM

Title: Create object contextual shortcut menu
Post by: alanjt on December 09, 2016, 06:38:27 PM
I know a shortcut menu can be edited and added to, but is it possible to create a shortcut menu that has a contextual object ('aliases' field) so when I select a specific object, it will display a specific set of commands in the right-click menu?
Title: Re: Create object contextual shortcut menu
Post by: BIGAL on December 10, 2016, 12:11:49 AM
What about the old fashioned screen menu option pick and object like line then a relevant screen menu pops up use it or not.
Title: Re: Create object contextual shortcut menu
Post by: snownut2 on December 10, 2016, 07:27:58 AM
alanjt,

I believe you need to create a reactor to accomplish such a task....
Title: Re: Create object contextual shortcut menu
Post by: tombu on December 10, 2016, 12:08:58 PM
I've added shortcut menus for a variety of objects.  Adding a duplicate one with objects instead of object works when you select multiple objects of the same type.  You cannot create one that works with multiple objects and several object types have special shortcut menu names like blocks and xrefs.  What object type do you want a shortcut menu for?  I may have one already.
Title: Re: Create object contextual shortcut menu
Post by: tombu on December 10, 2016, 02:21:35 PM
AUTODESK KNOWLEDGE NETWORK - About Creating Shortcut Menus
https://knowledge.autodesk.com/search-result/caas/CloudHelp/cloudhelp/2016/ENU/AutoCAD-Customization/files/GUID-8AE6163C-BBB0-4862-96F1-EB49923E317D-htm.html

Only one that I couldn't add one for was Anonymous Block, Autoturn produces Anonymous Blocks and I have a lisp to give them a name, but couldn't come up with a name that worked for Anonymous Blocks.

I prefer Shortcut Menus for modifying most stuff since a list of options to modify anything is a right-click away.  Contextual Tabs and Panels are nice too, but I'd been using the Shortcut Menus since they came out in version 2005.
Title: Re: Create object contextual shortcut menu
Post by: alanjt on December 12, 2016, 09:32:13 AM
I created a few, but I stopped when I realized I couldn't easily load them for everyone else with a partial cui, unless I'm missing something.
Title: Re: Create object contextual shortcut menu
Post by: BlackBox on December 12, 2016, 11:25:10 AM
I created a few, but I stopped when I realized I couldn't easily load them for everyone else with a partial cui, unless I'm missing something.

If memory serves, each user would have to transfer them to Main in CUI editor.

If you're sticking with native options, transferring them is the simplest option, second would likely be custom Contextual tabs (which I've not yet implemented personally).

FWIW, these are incredibly easy to implement via .NET API; how many are you after, and what do you want them to do?


Cheers