Can we set/access gname before invoking UI drawing tools?

We can use SetDrawEnv start, gname=fred to name a group of drawing actions programatically. After I do this for example before drawing a rectangle on a panel, I will see the name "fred" appear for the drawn object.

Do we have a way to set a value for gname at the point when we invoke the UI input tools (Show Tools)?

Do we have a way to set a gname value for a set objects (e.g. on a panel) that we have collected using the UI drawing mode? 

I think that the named groups are viewed strictly as support for programmers- it allows you to create a bunch of draw objects programmatically that can be easily replaced if something changes. The ternary graph package uses several named groups to make it easy to replace the triangular grid lines or the corner labels without having to erase and re-draw the whole thing.

In fact, named groups don't actually create a group in the sense of a collection of objects that get selected together, move together, etc. It's strictly a way for the DrawAction operation to act on a list of draw objects.

Long way to say, "No" :)

Please give us a use case, Jeff. It's such an abstract programmerly thing that I fear the presence of, for instance, an item in a tool menu like "Named Group" would invite tech support questions from non-programmer users who selected it and didn't see any discernable consequence.

 

Imagine a panel that has an existing set of text objects (titles and information) originally place by UI input. I decide that I want the text objects to appear or disappear depending on the state of a check box. I would like to be able to select the text objects, group them, and give the group a gname. I can run save the panel recreation macro, extract the gstart to gstop code block,  then add the equivalent of this code to a checkbox function (where the group is named "ionic").

if (turnon)
    DrawAction/W=Inputs getgroup=ionic, delete
else
    SetDrawEnv/W=Inputs gstart, gname=ionic
    ... stuff here extracted from panel recreation to draw the group
    SetDRawEnv/W=Inputs gstop
endif

It is simply a thought that would allow me to avoid having to pick through (oft very cluttered) recreation macros in a brute force way.

Could this be implemented with the equivalent of a new flag to SetDrawEnv??

  --> SetDrawEnv selection, gname=fred

A user could select objects using the UI tools and then type this on command line to name the selected objects as a DrawAction group.