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

Home » CadSoft Support Forums » eagle.suggest.eng » adding stuff to group via context menu
adding stuff to group via context menu [message #167175] Tue, 20 September 2016 12:32 Go to next message
Morten Leikvoll
Messages: 1348
Registered: November 2007
Senior Member
I want to make a context function that can add objects to the group,
like net segments, by tracking a wire. This will be handy to use for
changing layers of full segments between via's.

The logic flaw of using ingroup() with context selection gets into
conflict with this specific function here, as the existing grouped items
are lost.

Can you please separate ingroup() from the context selection and make
that incontext() or similar function name for context selected objects,
as suggested in the "Issue in 7.6.2 beta" thread under eagle.betatest?
Of course it should return false on all objects when executed under
normal shell.

I know this will make some problems for existing ULP's but since the
context menu has been full of bugs for some time, I think this will be
the least painful way to go. If you really need to keep that old
compatibility, I guess there are ways, like checking if #require is
above one version number, or maybe even something smarter.
Re: adding stuff to group via context menu [message #167434 is a reply to message #167175] Thu, 06 October 2016 14:04 Go to previous message
Morten Leikvoll
Messages: 1348
Registered: November 2007
Senior Member
On 20.09.2016 14:32, Morten Leikvoll wrote:
> I want to make a context function that can add objects to the group,
> like net segments, by tracking a wire. This will be handy to use for
> changing layers of full segments between via's.
>
> The logic flaw of using ingroup() with context selection gets into
> conflict with this specific function here, as the existing grouped items
> are lost.
>
> Can you please separate ingroup() from the context selection and make
> that incontext() or similar function name for context selected objects,
> as suggested in the "Issue in 7.6.2 beta" thread under eagle.betatest?
> Of course it should return false on all objects when executed under
> normal shell.
>
> I know this will make some problems for existing ULP's but since the
> context menu has been full of bugs for some time, I think this will be
> the least painful way to go. If you really need to keep that old
> compatibility, I guess there are ways, like checking if #require is
> above one version number, or maybe even something smarter.

While reading the 7.7.0 release notes it made me think of this thread again:

" - The selected object is no longer removed from the group after
running a ULP started through 'SET CONTEXT Object ...'; the ULP might
want to use this one-object group afterwards with e.g. 'exit("move (>@)")'."


Although I see this specific advantage, this made my all my mental alarm
bells go off, seeing new problems [even where there may be none].

For example, this means I may have to change my ULP's to explicitly
ungroup the context item if I don't really want it. If this is a problem
or not, I don't know yet, and that bothers me.

I would much rather leave all grouped objects alone, even when entering
the context function. (Hence the suggestion for a incontext function)

If the ULP needs to transfer the incontext object to the group, it
should have been done with the setgroup function.

Please, someone from Cadsoft comment on this. I'd really like this very
useful context menu stuff to be clean and future proof.
Previous Topic: Polygon thermals on for throughole only
Next Topic: [Multiline] text improvements
Goto Forum:
  


Current Time: Wed Jul 26 12:41:06 GMT 2017