News:

Please note new Forum URL: forum.designcad.com

Main Menu

Nested group fix

Started by Dr PR, June 26, 2012, 11:45:27 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

JJG

Hi all,

I have difficulty following your intentions of wanting to rebuild the world ...    :-\ ???

I am not a beta tester, but a simple user ... who uses DesignCAD about 8 hours per workday.
And I must tell you and repeat you, that, personally, I use nested groups with happiness since they appeared in the French version of DesignCAD (DesignCAD Pro 7000, v18.35), and God be praised, in the French version DesignCAD Pro 7000, and since the beginning of the appearance of these nested groups, there were the famous option "visibility by host layer" for these groups with.
Exactly same as for symbols.
In this, it is quite logical for the user, since symbols can also be some "containers".

Otherwise, for now, if you have difficulty of living with nested groups to mask or lock them by layers properties, you may build a macro that will changes the initial layer of all entities contained in the nested group to put them in the layer of the nested group : thus, you'll have no problems with nested groups and layers.
I. e. exactly same as for symbol when you decide to import them and have choiced the "Flatten" in the "Preference Settings" (found in Menu: Options / Preferences).
"Flatten" that works so (for symbols) : All of the symbol's entities, including those in nested symbols, get exploded to the layer on which the symbol was placed in the current drawing.
Also, this macro will just transpose this "flatten layer capabilitiy" to nested groups.
;)

Finaly, it remains to hope that DT quickly introduces this option "visibility by host layer" for nested groups, so that you can then convert you ...   ;D

Dr PR

JJG,

You don't need a macro to move all parts of a nested group to a single layer. Just select the nested group, open the Info Box, and select a layer.

Or, select the nested group and click the "A+" key on the Layers Toolbar. That will move all of the selected objects to the current layer.

Of course, both methods destroy the original layer order of the objects in the nested group. For example, you may put each subassembly (group) on a separate layer, and then select all subassemblies and group them (nested group) to create an assembly. Either method mentioned above will move all subassemblies to one layer.

Layers allow you to control visibility for parts of an assembly as described above. If you want all of the assembly to be hidden, turn off all associated layers.

In a structured assembly such as I described above, there is no logical single "host" layer for the entire assembly. I do not see how any layer can be a "host layer" nor do I see how one layer could control visibility of multiple layers.

If you are thinking the "host" layer is the layer containing the "container" how are we supposed to determine which layer has the container? Remember, the container is invisible, cannot be selected, and might be anywhere in a drawing.

Don't even think of saying "you should know that." What are we supposed to do - remember where we put each hidden container in every drawing we ever made, for the rest of our lives? Or write it down and then somehow keep the note associated with the file? What if the file was created by someone else and we have no idea where all of the hidden containers are located?

The very idea of a "host" layer seems screwball to me, especially since it is totally unnecessary.

The only objection I have to adding the "visibility by host layer" is that it would be a waste of programmer's time when we have so many more important bugs to fix and features to add. If it is added to the program, there must be a way to defeat it permanently and extirpate all vestiges of it from a drawing.

Phil
DesignCAD user since 1987

JJG

#17
Quote from: Dr PR on July 07, 2012, 08:45:39 AM
JJG,

You don't need a macro to move all parts of a nested group to a single layer. Just select the nested group, open the Info Box, and select a layer.

Sorry, DrPR, this method does not work ; if you change the layer of nested group via the infobox, sorry, but all entities remain in their respective layer (and I think it's not a bug at all, but rather an advantage ).

In contrast, the "A +" of the Toolbar Layers, then yes, I agree, it works, and flattens all the entities of the nested group in the active layer. (and I confess that I do not use it often).

Now, concerning the host layer, it is very useful for me.

If I decide to move this nested group is in layer 51 (for example), and then I want to hide (or lock) this layer 51, I expect (instinctively) that everything that is on this layer 51 will be hidden (or locked), including the nested group in question (and therefore everything containing in it), just same as a classical group (also non nested, which is however a "container" too, though you may think otherwise).
So this option "visibility by host layer" is perfectly logical, it allows you also to work in a perfectly intuitive way [without having to worry about what this or that is on what "floor" (or "level") in the nested groups], and is therefore the perfectly adequate way of working, such as that we have with the "regular"groups (i. e. non nested).
QED.

JJG

Quote from: Dr PR on July 07, 2012, 08:45:39 AM
...
Layers allow you to control visibility for parts of an assembly as described above. If you want all of the assembly to be hidden, turn off all associated layers.
...
If you are thinking the "host" layer is the layer containing the "container" how are we supposed to determine which layer has the container? Remember, the container is invisible, cannot be selected, and might be anywhere in a drawing.

In fact, what I can not understand is why you would like the "container" to be disconnected from the drawing, since you want it is not assigned to a layer, while all other entities are, including non-nested groups, who are also "container", whatever you said, just as improper solids, blocks, or symbols that are not related to an external file (that is say that are merged in the drawing).

And so, how would you do to lock it, or hide it, as one can do it for others "containers-types".

totaly illogical for me.


Now, to find out what is hidden or not, nothing prevents you to release everything from the Layer Options window, such as is done for any other entity ...

I find it perfectly natural and intuitive too ...

In a drawing that I receive, or what I did long ago, I do not need an external note to see what is hidden or not : I use the Layer Options window, and this is the right solution. You are doing the same trick, I'm sure.
So why would you do differently for nested groups ?

Totaly illogical too, for me.

JJG

#19
Quote from: Dr PR on July 07, 2012, 08:45:39 AM

The only objection I have to adding the "visibility by host layer" is that it would be a waste of programmer's time when we have so many more important bugs to fix and features to add. If it is added to the program, there must be a way to defeat it permanently and extirpate all vestiges of it from a drawing.

Phil


Sorry, since it has been already developped for the french version of Designcad, I don't understand how it could be a waste of programmer's time ...

And if you choose to work without nested groups, then I agree, this option should not be checkable in the infobox, or in the Option window.
In the french version of Designcad, it's how it works, and it makes perfect sense.

Dr PR

JJG

1. I greated a group of three objects on layer 1.

2. Then I created a group of three objects on layer 2.

3. Then I created a group of three objects on layer 3.

4. Next I switched to layer 4, selected all three groups and grouped them in a nested group.

5. I switched to layer 5 and selected the nested group - all objects were selected. I opened the Info Box and selected layer 5 for the nested group. All objects were moved to layer 5 (the Layers Dialog showed layers 1-4 to be empty, and only layer 5 held objects).

This has been the way to move objects between layers in DesignCAD since ProDesign (1987). It hasn't changed.

I repeated steps 1-4.

Then I switched to layer 5 and selected the nested group - all objects were selected. I used the A+ button in the Layers Toolbox to move all parts of the nested group to layer 5. The Layers Dialog showed layers 1-4 to be empty, and only layer 5 held objects.

I didn't start using the program yesterday.

Phil



DesignCAD user since 1987

JJG

Dr PR,

there must be a problem: when I do the steps 1-5 as you detail it, then I open the infobox, as you do, and change the layer of nested group from 4 to 5, sorry, but entities remain in their respective layers, which is totaly logical for me.

However, with a click on the A+ of the Layer Toolbox, then, yes, all entities are found in layer 5, as for you, and layers 1 to 4 become to be empty.

I remade this procedure successively in DesignCAD Pro 7000, DesignCAD Pro 8000, DesignCAD v19 and v21: the same result ...

You must have a different setup than me, probably.
Are you sure you have unchecked "Don't use nested groups" ?

prl

#22
Quote from: Dr PR on July 07, 2012, 10:18:04 PM
I switched to layer 5 and selected the nested group - all objects were selected. I opened the Info Box and selected layer 5 for the nested group. All objects were moved to layer 5 (the Layers Dialog showed layers 1-4 to be empty, and only layer 5 held objects).

Folks, not trying to take sides but what is described above is the way groups (including nested) groups should work.  If you select a group, you can move it, copy it, delete it, move all layers to a single layer, change all colors to a single color, etc.  All the steps you would normally do on an individual entity are done to the collective selection set (aka, the group).

prl

Quote from: JJG on July 08, 2012, 01:51:46 AM
I open the infobox, as you do, and change the layer of nested group from 4 to 5, sorry, but entities remain in their respective layers, which is totaly logical for me

JJG, you get a different behavior if "use nested groups" is on or off?  Can you reproduce the "normal" behavior (all selected items move to new single layer)?

prl

Here is how I believe nested groups should work.  Has nothing to with layers, merely how things are collectively selected including nesting.

This is a simple example.  Say every visible drawn entity has a group string field.  If the string field is empty, the entity does not belong to a group.

Step 1.
You draw two lines on two different layers and group them.  DesignCAD automatically adds "Grp1" to the group string fields for each entity. The entity string fields are autogenerated and always unique. For each entity, the group string fields would be:

Entity 1:  Grp1
Entity 2:  Grp1 

Step 2.  You draw another line and select it and one of the previous two lines and group them.  You now have three grouped items in two groups, one top level, two at level 2.  The entity string fields are front appended for each entity (separated by say a space or a comma):

Entity 1:  Grp2,Grp1
Entity 2:  Grp2,Grp1
Entity 3:  Grp2

Step 3.  You draw another line and select it and one of the previous three lines and group them.  You now have four grouped items with three groups.

Entity 1:  Grp3,Grp2,Grp1
Entity 2:  Grp3,Grp2,Grp1
Entity 3:  Grp3,Grp2
Entity 4:  Grp3

If you select entity 4, it will cycle all the DesignCAD entities looking for "Grp3" in the group string field. All "Grp3" entities are selected.

If you select entity 1, it will read (parse) the first field in the group string field and select the same "Grp3" entities.  "Grp3" is the top order partial matching filter.

If you select entity 2 and explode the top level group, it will cycle all the entities with the "Grp3" partial matching string field and purge the first field leaving you with:

Entity 1:  Grp2,Grp1
Entity 2:  Grp2,Grp1
Entity 3:  Grp2

This now means entity 4 is no longer grouped but entities 1, 2, 3 still are.

This is a very basic implementation but you get the point.  No containers or layers just  basic entity data fields like we now have for colors, layers, entity type, etc.

Dr PR

prl,

I agree completely.

jjg,

As I said, I did create nested groups, therefore, nested groups were not disabled.

I suspect the difference is that you are using a different version of the program than I am. Clearly, the French version has totally screwed up nested groups that somehow scrambles the concepts of groups and layers. As prl says, groups and nested groups should be totally independent of layers.

Phil
DesignCAD user since 1987

Lar

I get the same effect as JJG, which I was trying to explain in the other thread on nested groups.

Also, when I switch 'don't use nested groups' from off to on I can select multi-layered 'normal groups' if any of the layers are locked or off for an undetermined length of time.

Lar

prl

Quote from: Lar on July 08, 2012, 09:51:25 AM
I get the same effect as JJG, which I was trying to explain in the other thread on nested groups.
Also, when I switch 'don't use nested groups' from off to on I can select multi-layered 'normal groups' if any of the layers are locked or off for an undetermined length of time.

No wonder you are intrigued. JJG is sold on it, Lar is pondering its potential.  Do we dare talk about it?

JJG

Quote from: prl on July 08, 2012, 07:51:28 AM
Quote from: JJG on July 08, 2012, 01:51:46 AM
I open the infobox, as you do, and change the layer of nested group from 4 to 5, sorry, but entities remain in their respective layers, which is totaly logical for me

JJG, you get a different behavior if "use nested groups" is on or off?  Can you reproduce the "normal" behavior (all selected items move to new single layer)?

prl, the answer is YES.

And please, note that I'm not sold to anything.

I just know to recognise what is good, works in a intuitive way, or not.

And YES, for me, how Cogistem has improved the way of using nested groups before to implement them in the Designcad pro 7000 french version is so good and intuitive that I never had problem with them.

And so, I'm really surprised of so many bla-bla about something that really works very well in the French version.

Please, try it before saying it is not the good solution.

And for me, the fact that entities remain ever in their respective original layer in nested groups (if you use the infobox to move the nested group to another layer) is a big advantage compared to classical groups or improper solids, with which you lose all entities's original layer informations when you move the group or the improper solid to another layer (via infobox or any other way to do it) : with nested groups, actually in the versions I have on my machine, if you explose (recursive or not) the nested group, you can retrieve all entities exactly in the original layer they were created.
Fantastic, right?

JJG

Quote from: prl on July 08, 2012, 08:31:11 AM
Here is how I believe nested groups should work.  Has nothing to with layers, merely how things are collectively selected including nesting.

This is a simple example.  Say every visible drawn entity has a group string field.  If the string field is empty, the entity does not belong to a group.

Step 1.
You draw two lines on two different layers and group them.  DesignCAD automatically adds "Grp1" to the group string fields for each entity. The entity string fields are autogenerated and always unique. For each entity, the group string fields would be:

Entity 1:  Grp1
Entity 2:  Grp1  

Step 2.  You draw another line and select it and one of the previous two lines and group them.  You now have three grouped items in two groups, one top level, two at level 2.  The entity string fields are front appended for each entity (separated by say a space or a comma):

Entity 1:  Grp2,Grp1
Entity 2:  Grp2,Grp1
Entity 3:  Grp2

Step 3.  You draw another line and select it and one of the previous three lines and group them.  You now have four grouped items with three groups.

Entity 1:  Grp3,Grp2,Grp1
Entity 2:  Grp3,Grp2,Grp1
Entity 3:  Grp3,Grp2
Entity 4:  Grp3

If you select entity 4, it will cycle all the DesignCAD entities looking for "Grp3" in the group string field. All "Grp3" entities are selected.

If you select entity 1, it will read (parse) the first field in the group string field and select the same "Grp3" entities.  "Grp3" is the top order partial matching filter.

If you select entity 2 and explode the top level group, it will cycle all the entities with the "Grp3" partial matching string field and purge the first field leaving you with:

Entity 1:  Grp2,Grp1
Entity 2:  Grp2,Grp1
Entity 3:  Grp2

This now means entity 4 is no longer grouped but entities 1, 2, 3 still are.

This is a very basic implementation but you get the point.  No containers or layers just  basic entity data fields like we now have for colors, layers, entity type, etc.

For me, the current operation of nested groups is not very far from what you describe:

Simply, instead of Grp1, Grp2, Grp3 etc. ... DesignCAD uses a "virtual line" (Nr 1) to connect the entities that must belong to the first group, another "virtual line" (Nr 2) to connect the entities that must belong to the second group etc. ...

These "virtual lines" are the famous "entities 34"  which enable and involves linking the nested goup (represented by this "virtual line") to a layer, called, in the French version, the host layer.
So with the "visibility by host layer", these "entities 34" behave like any other entity with respect to layers (lock, visibility).

Now, to explain why the entities contained in the nested group are moved to the layer of the nested group when you decide to move the nested group to another layer via the infobox :
it's because, in the infobox, you just and only move this "entitie 34" (or "virtual line" to another layer, and not the entire "container". all right ?

In contrast, with the layer toolbox, clicking A +, then you're clearly saying to Designcad that the entire selection (no matter what it contains) must be placed on the active layer.
the difference is not only subtle, it is huge!