DesignCAD 3D Max 2027 box
Now available

DesignCAD 2027

Hatches that follow their boundaries, an on-screen dial to turn your model, and a way to find any command by name, in a clean Windows 11 look.

Group grope?

Started by cavelamb, December 05, 2012, 10:41:58 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

cavelamb

I've run into this one a few times and wanted to ask - whazup?

There are actually two problems here.
The most apparent one is that the JPG (perspective) is blocking
part of the drawing (with a big black rectangle).  Annoying, but
most likely a video driver issue.  (This is on my old coal powered
HP - XP sp3 running V20)

But the thing that I wanted to ask about is the group mess.
Two of the schematics are - entangled at the quantum level?
The Audio out and video out were drawn and grouped independantly.
But sometimes moving two grouped objects at the same time seems
to combine them into one group.  ?

comments?

prl

#1
Cavelamb, 

The consensus on this forum is that groups work perfectly and are totally screwed up.   :o

Remind us what version created this problem in your drawing (also version 20 on your coal fired computer?).  Version 15 would self-group things if the group index numbers overflowed the limits.  Version 16 to 22 have increased the index limits but also added nested grouping which has added its own problems.

Dr PR

#2
cavelamb,

I see the black rectangle too, so it isn't a video driver issue. It is a black rectangle. The infor box identifies it as a "Bitmap," so I suppose it is a photo of the inside of a coal mine with all of the lights turned out.

Actually, it looks like the lower half of the bitmap is black - I do see part of the perspective image above the black rectangle.

The two schematics are grouped together. The drawing has only one group, and the Maximum Group ID is 1.

I disabled nested groups and that had no effect.

I have never seen the effect of selecting and moving two groups at a time making them into one group.

Phil
DesignCAD user since 1987

cavelamb

Quote from: prl on December 05, 2012, 11:28:28 AM
Cavelamb, 

The consensus on this forum is that groups work perfectly and are totally screwed up.   :o

Remind us what version created this problem in your drawing (also version 20 on your coal fired computer?).  Version 15 would self-group things if the group index numbers overflowed the limits.  Version 16 to 22 have increased the index limits but also added nested grouping which has added its own problems.

Hi prl,

Good point. I missed posting that. Sorry.

The drawing was done mostly in V10, with V20 used
for the rendering. The JPG is a screen shot from V20.

I have version 10 (DC2000) and V20 on this box.
10 is my main squeeze.  It has no real issues at all.
Everything it does, it does well and quickly.
So I use it a lot.

V20, on the other hand, has some serious video issues,
some of which were corrected by the update, others not.
But it does stuff that is so cool I can deal with the video.

I'll play around with this some more and see if I can add
anything useful.

cavelamb

Quote from: Dr PR on December 05, 2012, 11:29:40 AM
cavelamb,

I see the black rectangle too, so it isn't a video driver issue. It is a black rectangle. The infor box identifies it as a "Bitmap," so I suppose it is a photo of the inside of a coal mine with all of the lights turned out.

Actually, it looks like the lower half of the bitmap is black - I do see part of the perspective image above the black rectangle.

The two schematics are grouped together. The drawing has only one group, and the Maximum Group ID is 1.

I disabled nested groups and that had no effect.

I have never seen the effect of selecting and moving two groups at a time making them into one group.

Phil

I've run into this once in a while with V10.
Usually I can explode the mess and regroup ok.
I've never really nailed down why it happens.
This time I noticed it right after doing a block move.
But they might have been linked prior to that.
Dunno...

prl

Phil beat me to it, but the group index didn't overflow.  Is it possible that you started moving something and you hit a stray key that forced a regrouping of the items you were trying to move?  On my keyboard, I have "grouping" as the G hotkey so for me this would be very possible.

cavelamb

This started out with three grouped objects.
Each of the schematics were imported from
another drawing - and were grouped there.

I can't determine which version created those.
I tend to save everything in V10 format for
compatibility sake.

Then I exploded one of the small schematics
to remove a resistor.

I _think_ that's when the boo-boo happened.



prl

Quote from: cavelamb on December 05, 2012, 11:48:46 AM
This started out with three grouped objects.
Each of the schematics were imported from
another drawing - and were grouped there.

Back then, version 15 and before, this caused me significant problems.  Dramatic increases occurred in the group index numbers when cutting and pasting between new and older goby drawings.

In version 10, open up some of your source drawings and run the gc.d3m on them.  I just tested this code and it should run in Dc2000.

'Program: gc.d3m (group count)

'Gather groupid numbers, display group count and largest used index value

Dim grouplist(10000)

gcount = 0
maxgroup = 0

print "working . . ."
for j = 1 to sys(9)
  existflag = 0
  getattr j, type ,select, laynum, groupid, red, green, blue, solidid

  if groupid > 0 then
     
     if groupid > maxgroup then
        maxgroup = groupid
     endif
         
     for jj = 1 to gcount
       if groupid = grouplist(jj) then
         existflag = 1
         exit for
       endif     
     next jj
     
     if existflag = 0 then
        gcount = gcount + 1
        grouplist(gcount) = groupid
     endif
  endif
next j

regen
precision 0

Message "Total group count is: ",gcount,chr$(13),chr$(13),"Maximum group id is :", maxgroup
end


You may need to group pack your older drawings if the parts you are borrowing have high index numbers.  Lar once posted a method for doing this using cut and paste between the old drawing and a new empty drawing.  Maybe if he reads this, he can remind us.

cavelamb

Quote from: prl on December 05, 2012, 12:00:15 PM
Quote from: cavelamb on December 05, 2012, 11:48:46 AM
This started out with three grouped objects.
Each of the schematics were imported from
another drawing - and were grouped there.

Back then, version 15 and before, this caused me significant problems.  Dramatic increases occurred in the group index numbers when cutting and pasting between new and older goby drawings.

In version 10, open up some of your source drawings and run the gc.d3m on them.  I just tested this code and it should run in Dc2000.


You may need to group pack your older drawings if the parts you are borrowing have high index numbers.  Lar once posted a method for doing this using cut and paste between the old drawing and a new empty drawing.  Maybe if he reads this, he can remind us.

Thanks prl. 
So what would be a "high" number???

cavelamb

Quote from: prl on December 05, 2012, 11:45:20 AM
Phil beat me to it, but the group index didn't overflow.  Is it possible that you started moving something and you hit a stray key that forced a regrouping of the items you were trying to move?  On my keyboard, I have "grouping" as the G hotkey so for me this would be very possible.

It would be quite embarrassing if anyone knew how primitive my set-up is.
I have NEVER redefined keys, and just ran my first macro. (blush)

So no, the G key is still defined as default (grid?).

But I do take your point.
I'll have a serious talk with my fingers!

prl

Quote from: cavelamb on December 05, 2012, 12:33:06 PM
So what would be a "high" number???

Well in version 15, overflow was around 16000 but problems happened if group numbers were around half that.  Phil once described the problem in great detail and I don't remember all of it but it was something like this. DesignCAD rather than using the next available index number was instead doubling the source number (or some variation of that).  Bottom line, it was easy to have just a few groups and yet have high group index numbers.

Oh I should mention it, not sure if it happened in version 22 or maybe in your version 20, but there is a "pack group index" function now. Maybe you can try packing your older drawings with one of the newer versions.  If you stick to basic stuff, things will probably work OK between version 10 and 22.  I still use version 15.3 a good deal so I'm sympathetic to hanging on to past favorite versions. 

Dr PR

Cavelamb,

Each group has a Group ID number that is used internally in the program to identify parts of groups. This is supposed to be a unique number for the individual group. The program uses a variable (Maximum Group ID) to remember the next Group ID that will be used.

When a group is created it is given the Group ID = Maximum Group ID. Then Max Group ID is incremented. Even if you delete a bunch of groups, Max Group ID is not reduced - it always continues to grow. This number is stored in a variable with a finite number of bits. If the Max ID reaches the highest value that can be stored in the variable, when it is incremented it rolls over to zero. The program then starts numbering new groups at 0, then 1, then 2, ...

When you create a new group it gets the next Max ID number N, and Max ID becomes N+1. If an old group with Group ID = N already exists the new group parts will be added to it. Consequently, group N becomes a mix of parts from the original group N and the new parts that were added to it.

This sneaks up on you in drawings that you have used and edited for many years. The Max ID timebomb is waiting in every drawing.

Later versions (V18 and after) have a much larger Max Group ID variable, something like 32 bits. However, it is still possible for even this number to overflow. prl posted a comment a few years ago about having a drawing with a few hundred groups but a Maximum Group ID of over 44 million!

****

There is a way to "repack" group IDs to fix the problem in older versions (new versions have a much larger max ID and a function to repack group IDs):

1. Open a new empty drawing.
2. Draw one object (anything will do, such as a single line).
3. Define the object to be a group. Now you have one group in the drawing and the next group will be #2.
4. Open the problem drawing.
5. Select everything and copy to the clipboard.
6. Switch to the new drawing and paste the clipboard contents. This forces the program to renumber all groups, starting at 2.
7. Save the drawing with a new name so your old drawing will still be unchanged.

Note: Unfortunately, all layer names will be lost so you will have to rename them.

You might try this and see if your problems go away.

****

Here is DT's post about the problem:

http://forum.designcad.com/index.php?topic=1526.msg7885#msg7885

Solids have this same problem. Again, the solution is to copy everything into a new drawing with one solid in it.

The newest versions have "Pack Group ID" and "Pack Solid ID" functions that repack group/solid IDs and create a new Max ID that is 1 or 2 greater than the largest group/solid ID.

Phil

DesignCAD user since 1987

Lar

Quote from: prl on December 05, 2012, 12:00:15 PM
  Lar once posted a method for doing this using cut and paste between the old drawing and a new empty drawing.  Maybe if he reads this, he can remind us.

Quote from: Dr PR on December 05, 2012, 03:11:25 PM
There is a way to "repack" group IDs to fix the problem in older versions (new versions have a much larger max ID and a function to repack group IDs):

1. Open a new empty drawing.
2. Draw one object (anything will do, such as a single line).
3. Define the object to be a group. Now you have one group in the drawing and the next group will be #2.
4. Open the problem drawing.
5. Select everything and copy to the clipboard.
6. Switch to the new drawing and paste the clipboard contents. This forces the program to renumber all groups, starting at 2.
7. Save the drawing with a new name so your old drawing will still be unchanged.

I know I discovered this method but I had forgotten the exact steps. Thanks to Phil for remembering them. I actually stopped using the method (prior to the 'pack group id' command) because in a short time the group count was way up there again.

Cavelamb, another thing to remember about pasting in stuff is that the group count increases by double the amount of groups pasted in. So in the method Phil describes, if, after defining the first group 10 new groups are pasted in, instead of the group count becoming 11 (1 existing +10 pasted in), it became 21 (1 existing plus 2 x 10 pasted in).

Lar

Dr PR

cavelamb,

What do you mean by "block move?" What commands are you using?

DesignCAD has "Blocks" which are essentially a special type of group. Are you using groups or blocks?

Phil
DesignCAD user since 1987

Lar

Phil, I'm not sure if v10 was a DOS or Windows version but I remember back in the DOS days a 'block' was what we now call a 'group'. When dcad later came to windows they were called groups, I think, and acad style 'blocks' were introduced later.

Lar