News:

Please note new Forum URL: forum.designcad.com

Main Menu
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 ID overflow warning

Started by Dr PR, December 28, 2009, 11:03:15 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Dr PR

It would be nice if DesignCAD produced a warning message when the Max Group ID value was about to overflow.

For those who haven't seen this problem, each group has an 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 last Group ID that was used. When new groups are created this Max Group ID is incremented. When it reaches the largest number that the variable can hold and another group is added the Max Group ID rolls over to zero, the smallest number the variable can hold.

Two problems appear when this happens. First, if a new collection of objects is grouped it is given a Group ID = 0 (or 1, I am not sure). If another group already exists with this Group ID number, both collections/groups are treated as a single group. The Group ID is no longer unique to a single group of objects. As more groups are added they are lumped together with any previously existing groups with the same ID number.

The other problem with Max Group ID overflow is that occasionally the drawing file becomes corrupted and can no longer be opened. Of course, this usually happens only in files that have been worked on for a long time, so months or years of work are lost.

There are ways to solve this problem, but we need to know when it is about to happen. A warning message, say when the Max Group ID is maximum value less ten, would tell us we need to fix the problem before things start falling apart.
DesignCAD user since 1987

paulerens

Dr PR
Do you talk about version 16, 17, and 18 or 19 version?
In version 19 the problem is partially solved, only the group number increases to millions

When group number = 0 then it means that the entity not belonged to a group.

Dr PR

Prior to V18 the Max Group ID was about 16,000 maximum. In V18/19 it is something like a few million (the actual number is somewhere on the Forum in one of DTs posts).

It is actually very easy to exceed the new number. Just create a group then cut and paste it. Then select all groups and cut and paste. Repeat. In about 30 operations you will exceed the new number.

Note: cut and paste runs up Max Group ID twice as fast as duplicate (N).

The really sneaky thing that creeps up and clobbers you comes as you reuse old drawings to create new ones. The Max Group ID never gets smaller, and after a few years you might be working on a small drawing with only one or two groups and suddenly the file won't open any more. This happened to me. Fortunately I had a backup made before the last group was created and I was able to repack groups by copying and pasting everything from the backup into a new file containing only one group.

DesignCAD user since 1987

Dempsey

Dr PR,

This still needed now that v20.0 has Pack Group IDs?
Dempsey

JJG

Dr Pr,

In V15 and previous, It appeared sometimes similar problems as you describe when copy and past some groups from other drawings ; in Deigncad pro 7000 (V18), I never remarks that ... maybe the problem has be fixed ?

Dr PR

Dempsey,

I think it is still needed since the Group ID packing is not automatic.

If the Group ID overflows really strange things can happen to a drawing that are not easily fixed. I had one drawing become corrupted so that it could no longer be opened. Even though the Max ID number has been increased it can still be exceeded easily if you are creating arrays of groups.

Either the program should warn the user to pack IDs or it should do it automatically.

Personally, I would like an option to automatically pack Group IDs every time the program shuts down (or starts). Shut down would be better because this would increase the probability that the file could be opened in older versions of DesignCAD with less chance of problems.

This should be optional since some folks have used the Group ID number as a fixed identity in macros.
DesignCAD user since 1987