EAGLE Central Forums
Where the EAGLE community meets. Sponsored by Stratford Digital.

Home » CadSoft Support Forums » eagle.suggest.eng » SET CONTEXT context
SET CONTEXT context [message #165597] Mon, 25 April 2016 12:18 Go to next message
Morten Leikvoll
Messages: 1352
Registered: November 2007
Senior Member
In reference to the support thread "Bug, Breaking a polygon (7.5.3)",
there is a need to cleanup the SET CONTEXT command.

I want to run a script that adds all the context menus I want for my
work. This involves menus for schematic, board, library (both symbol and
package, part may not yet have any). Now, addressing this is pretty awkward.

Since the context object is pretty flat (a UL_WIRE can exist in all
those 4 contexts) I have to enter each editor to actually set these.
schematic and board is rather easy, but setting library context menus
from a general unknown context is not that straight.

Also, there are at least one missing objecttype; polygon.

This is why I want to suggest separate objects for all these contexts.
How it's done is not important, but you should be able to set any
context menu from any context. A suggestion could be to add support for
optional .brd/.sch/.pac/.sym extension to the objecttypes.
Re: SET CONTEXT context [message #165706 is a reply to message #165597] Thu, 12 May 2016 07:45 Go to previous messageGo to next message
Morten Leikvoll
Messages: 1352
Registered: November 2007
Senior Member
On 25.04.2016 14:18, Morten Leikvoll wrote:
> In reference to the support thread "Bug, Breaking a polygon (7.5.3)",
> there is a need to cleanup the SET CONTEXT command.
>
> I want to run a script that adds all the context menus I want for my
> work. This involves menus for schematic, board, library (both symbol and
> package, part may not yet have any). Now, addressing this is pretty
> awkward.
>
> Since the context object is pretty flat (a UL_WIRE can exist in all
> those 4 contexts) I have to enter each editor to actually set these.
> schematic and board is rather easy, but setting library context menus
> from a general unknown context is not that straight.
>
> Also, there are at least one missing objecttype; polygon.
>
> This is why I want to suggest separate objects for all these contexts.
> How it's done is not important, but you should be able to set any
> context menu from any context. A suggestion could be to add support for
> optional .brd/.sch/.pac/.sym extension to the objecttypes.

I'd like to add more objecttypes, as I see the potential for new
interesting context functions.

The board or schematic background
The board/sch itself could enable a context menu for stuff like opening
space vertical or horizontal, or even inserting stuff. The problem is if
the catch factor is 0, and eagle grabs nearest item when right clicking.
Maybe right clicks could be an exception.

A Group
It would be nice to do context functions on a group. Currently the
selected group highlight is removed when you rightclick. Does it have to
be like that? If not, a group context can easily be implemented.
Re: SET CONTEXT context [message #165716 is a reply to message #165706] Fri, 13 May 2016 18:02 Go to previous message
rachaelp
Messages: 608
Registered: March 2015
Location: UK
Senior Member
Morten Leikvoll wrote on Thu, 12 May 2016 08:45
On 25.04.2016 14:18, Morten Leikvoll wrote:
> In reference to the support thread "Bug, Breaking a polygon (7.5.3)",
> there is a need to cleanup the SET CONTEXT command.
>
> I want to run a script that adds all the context menus I want for my
> work. This involves menus for schematic, board, library (both symbol and
> package, part may not yet have any). Now, addressing this is pretty
> awkward.
>
> Since the context object is pretty flat (a UL_WIRE can exist in all
> those 4 contexts) I have to enter each editor to actually set these.
> schematic and board is rather easy, but setting library context menus
> from a general unknown context is not that straight.
>
> Also, there are at least one missing objecttype; polygon.
>
> This is why I want to suggest separate objects for all these contexts.
> How it's done is not important, but you should be able to set any
> context menu from any context. A suggestion could be to add support for
> optional .brd/.sch/.pac/.sym extension to the objecttypes.

I'd like to add more objecttypes, as I see the potential for new
interesting context functions.

The board or schematic background
The board/sch itself could enable a context menu for stuff like opening
space vertical or horizontal, or even inserting stuff. The problem is if
the catch factor is 0, and eagle grabs nearest item when right clicking.
Maybe right clicks could be an exception.

A Group
It would be nice to do context functions on a group. Currently the
selected group highlight is removed when you rightclick. Does it have to
be like that? If not, a group context can easily be implemented.


These suggestions all get my vote. I had a need for a background context menu just the other day but I have forgotten what I was trying to do now so can't elaborate....

I didn't actually know you couldn't do group operations in a context menu function, I'd just assumed you could use ingroup() in the ulp and it would get everything from the most recently grouped objects, if it doesn't that's quite disappointing....

In addition, how about dynamically generated sub-menus in the context menu? So one example where this would be useful, I currently have a "View Datasheet" option on my context menu which opens the datasheet of a part in my default browser. If there were multiple documents listed (with a suitable separator) in my datasheet attribute, for example, a datasheet, a package drawing, etc then I could have these appear as different options in a sub-menu.

Also it would be nice to be able to assign custom icons to context menu entries too and maybe a way to assign keyboard shortcuts and display the shortcut on the menu item.
Previous Topic: Manual routing assistance (push and shove)
Next Topic: How about GIT support for designs?
Goto Forum:
  


Current Time: Tue Oct 17 06:03:39 GMT 2017