Seeking an extension to add component context menu option to create new tag from selection

I’m searching to replace the recently removed efficient method of creating a new tag from the entity info window on Mac.

In my mind it would work like this:

  1. Select a component

  2. Right click to access context menu

  3. Choose option “Create Tag from Selection”

  4. The extensions reads the existing name of the component, creates a new tag with the same name, assigns the selected component to that tag.

I have no idea if this process is open to the API or if this is possible. Has anyone seen a tag creation extension that does this or anything similar ?

I don’t know of an existing one, but that wouldn’t be hard to write. The necessary calls are in the Ruby API. On my phone now, so I can’t code. If nobody chimes in I may give it a shot later.

1 Like

I just recently coded that up 11 days ago for @paul.mcalenan. Perhaps he has or will release it ?

1 Like

Well it actually just prompts the user for a new tag name. (It doesn’t use any properties of what is selected.)

Dan expanded greatly (and put me right) on some code that I was attempting to provide for someone at the other forum.

Part of the code creates a context menu that allows you to create a new tag for the selected object…

1 Like

I see, that would still be a help. Perhaps ideally it could open a dialogue for renaming that is pre-populated with the component name and pre-selected text. So one could simply press return to use the component name, or start typing to make a new name.

But I’d be very grateful for a version in any form. Thanks everyone.

I suppose the insertion of a conditional expression to devine if the selection was a single object and it was a component or group, then the default for the input box could be set to the name.

Would you use the instance name or the definition name ? or check 1st the instance and if empty then the definition ?

Currently it just works upon all elements in the selection, ie … expecting a multiple selection.

2 Likes

Ah so, @dezmo is 14 days ahead of us. :wink:

2 Likes

The very thing. Thanks for sharing @dezmo. Thanks to all for responding.

Beer is on me at the next Basecamp! :beers:

2 Likes

Beer? I wish I could code…

1 Like

You get beer just for being you!

1 Like

I’ll give it from mine. :beers: … You can get half of it :beer:

2 Likes

@colin This thread will also be relevant for the work you plan to do with Tags… Between @dezmo and @eneroth3 you may be closer to a solution than first thought. Power of the community!