Author Topic: Groups - new plugin  (Read 20518 times)

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 5262
  • Made in England
    • View Profile
Groups - new plugin
« on: November 24, 2016, 15:28:06 pm »
Allows grouping / ungrouping of objects.
After installation the plugin will show up in;

Edit->Group
Edit->UnGroup


1. Select two of more objects on the screen, click on 'Group' from the menu, all those items will now be selected at the same time by just clicking on one item of that group.  
2. Select a group by clicking on one member of that group then click, 'UnGroup' from the menu to explode the group.
3. The group name will appear in the 'Tag' field of every entity within a group.

Edit:

Version 2 attached

1. as suggested by jk I changed the code, made it into just one class.
2. added icon buttons to the View Toolstip

Edit:

Version 3 attached

1. Group, Ungroup, Add to group, Remove from group
2. new icons (get yer glasses on) at least they have ToolTips
3. menu items also added to 'Edit' menu

Thanks to jk for the simple  ::)  line of code for refreshing the properties.
Source files attached

Edit:

Version 4 attached

1. 'Copy Group' added

Select a group then click 'Copy Group' icon, a copy of the group will be created.
The new group name will be, "original group name - Copy1"

Edit:

Update attached, version 5

Has been compiled with .NET version 4 assemblies and references to CamBam v1.0 dlls

Has been modified and tested to work on;

    Windows
    Linux

Works with CamBam version 1 ONLY
« Last Edit: January 09, 2017, 20:04:35 pm by EddyCurrent »
Filmed in Supermarionation

Offline jk

  • Wookie
  • ****
  • Posts: 265
    • View Profile
Re: Groups - new plugin
« Reply #1 on: November 24, 2016, 15:50:37 pm »
Wow ! That was that the selection handler for )

Fails to load on my install:
Error loading plugin ... Groups.dll
Exception was thrown by the target of an invocation

---
I peeked at code, the new class instance is created at each menu click. Maybe this is the cause of error. Maybe there must be a single always running instance (aka dispatcher).
« Last Edit: November 24, 2016, 16:02:30 pm by jk »

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 5262
  • Made in England
    • View Profile
Re: Groups - new plugin
« Reply #2 on: November 24, 2016, 16:00:11 pm »
That's a good start !

Okay, I've just recompiled it and tried it on mine, it works okay.
I've replaced the file in my first post if you try it again.

« Last Edit: November 24, 2016, 16:49:17 pm by EddyCurrent »
Filmed in Supermarionation

Offline Bubba

  • CNC Jedi
  • *****
  • Posts: 3355
    • View Profile
Re: Groups - new plugin
« Reply #3 on: November 24, 2016, 16:10:11 pm »
Eddy, wonderful plugin, The first version threw an error, the latest edition works as described. Thanks.
My 2ยข

Win11, CB(1.0)rc 1(64 bit) Mach3, ESS, G540, 4th Axis, Endurance Laser.

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 5262
  • Made in England
    • View Profile
Re: Groups - new plugin
« Reply #4 on: November 24, 2016, 16:14:06 pm »
Bubba,

That's good to hear.
My mind was not fully on it before because my son was driving over 100 miles home and it's sub zero temperatures here at the moment, he's got there now so I can relax a bit.
Filmed in Supermarionation

Offline jk

  • Wookie
  • ****
  • Posts: 265
    • View Profile
Re: Groups - new plugin
« Reply #5 on: November 24, 2016, 16:36:06 pm »
Now it works. Should be very useful, thanks !

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 7408
    • View Profile
    • Cambam V1.0 French Doc
Re: Groups - new plugin
« Reply #6 on: November 24, 2016, 21:31:45 pm »
Hello

Very good, nice addition ;)

++
David

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 5262
  • Made in England
    • View Profile
Re: Groups - new plugin
« Reply #7 on: November 24, 2016, 21:32:46 pm »
David,

Thanks, I've just attached version 2 to the first post.

One issue that might occur is if someone else uses the Tag field.
« Last Edit: November 24, 2016, 21:34:51 pm by EddyCurrent »
Filmed in Supermarionation

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 7408
    • View Profile
    • Cambam V1.0 French Doc
Re: Groups - new plugin
« Reply #8 on: November 24, 2016, 21:45:18 pm »
I lag behind ! I've 2 plugins in progress .. but very very slowly  ::)

But now, I'm able to do working toolbars in VB  8) (after exploring yours in C) ... at least, I've the toolbar and images for buttons that are done for one plugin LOL

Not tried yet the very last version, but on the previous, if we select one object on the screen, all are also selected in the treeview, but if we select one object in the treeview, all objects grouped with it are selected in the display, but not in the treeview.

maybe it can be a way to remove one object from a group, we select it in the treeview then hit a "remove from group" item in the edit menu or/and in the context menu of the drawing object.

++
David

Offline Garyhlucas

  • CNC Jedi
  • *****
  • Posts: 1463
    • View Profile
Re: Groups - new plugin
« Reply #9 on: November 24, 2016, 22:25:29 pm »
This looks really useful.  I used to do extensive complex assemblies with thousands of parts in Rhino 3D and used grouping to create subassemblies.  Some really useful tools in Rhino were Add to group and Extract from group.  Exploding a group meant having to reselect everything again. I often extracted a part to modify just that part then added it back when done.
Gary H. Lucas

Have you read my blog?
 http://a-little-business.blogspot.com/

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 5262
  • Made in England
    • View Profile
Re: Groups - new plugin
« Reply #10 on: November 24, 2016, 22:45:53 pm »
It's only at version 2, there's plenty of numbers to go at yet  :D
Filmed in Supermarionation

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 7408
    • View Profile
    • Cambam V1.0 French Doc
Re: Groups - new plugin
« Reply #11 on: November 25, 2016, 04:06:37 am »
I've a look on autocad (LT) and there is a button on the group toolbar that only enable/disable the group selection, so you just need to disable group selection to be able to select and work on an unique object, then enable again the group selection without to have to explode the group. Maybe it can be a easy thing to implement on your plugin ?

added to the website ;)

++
David

Offline Dragonfly

  • CNC Jedi
  • *****
  • Posts: 2652
    • View Profile
Re: Groups - new plugin
« Reply #12 on: November 25, 2016, 11:05:36 am »
Sounds great. Will try it later. Another feature from my personal wish list :)
As for selecting an item in a group, for example in CorelDraw this is done by Ctrl+click on the item.

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 5262
  • Made in England
    • View Profile
Re: Groups - new plugin
« Reply #13 on: November 25, 2016, 11:50:46 am »
I've got add, remove working same as in Rhino, just needs tidying up.
Filmed in Supermarionation

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 5262
  • Made in England
    • View Profile
Re: Groups - new plugin
« Reply #14 on: November 25, 2016, 17:51:03 pm »
New version (3.0) added to first post

1. functions include;

Group
UnGroup
Add to group
Remove from group

2. new icons
Filmed in Supermarionation