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.

Touch

Started by bdeck, August 01, 2013, 11:33:56 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

bdeck

Every time I examine an old file with DC (I use 17.2 at work) it changes the "Modified" date of the file.

Is there a way to avoid this annoying behaviour?

BD

Lar

This is a real pain for me too!!

This is due to the 'undo' data that dcad uses as you work. The problems occurs whenever a file is saved but not closed, ie, say you work on a file called 'work_1.dcd', save it, then 'save as' to a different name ('work_2.dcd'), then close the file or dcad. Upon closing, dcad would purge the undo data from 'work_2'. However, since 'work_1' was not actually closed it still contains the undo data (which just about doubles the file size). Later on, say you open 'work_1', look over it and close it without doing anything to it. Upon closing dcad would then purge the file of the undo data and save it without asking you, with the new date. If you did make changes to the file but closed it without saving, it would still be purged and saved by dcad but I'm not sure if the changes would be saved.

The only way to avoid this problem is to, upon finishing a working session and after saving and closing the file you are working on, open the other version of the file and close it. This would purge the undo data so the next time you open it dcad would not have to purge it.

I have lots of wasted hard drive space due to this doubling of the filesize (due to unpurged undo data) that I did not reopen and close. I can do nothing about these files because I want to preserve the modified date. If I do have to open an old file I append the filedate to the name so in case it gets purged I will have some record of when the file was last worked on.

A long time ago I planned on looking into writing a macro that would open a file, change the computer's system date to the date of the file then close the file (thereby purging it with the proper date), then open the next file in the folder and repeat, until all the files in a folder are purged, then correct the system date. I never did look into writing that macro. Could be dangerous messing with the system date, though.

Lar

bdeck

Hi Lar,

One way do deal with the problem would be to save the mod date and time within the file name. That would be a simpler macro, but lead to unmanageable filename length.

Such measures should not be necessary. I posted a feature request.

Regards,

BD

Lar

BD,

I saw your feature request post... (http://forum.designcad.com/index.php?topic=5146.0;topicseen)

...Love the title!!  ;D

Lar

MarkX

If you change the file property to "read-only" it seems to prevent any changes from accumulating. You just have to be careful to unset that value when you really do want to make changes.

Mark

Dempsey

bdeck, Lar,

I looked into this in order to add it to the problem list.

I am using V23.0 and followed Lar's sequence and it does not reproduce on my machine.

Opened old drawing X, added a line, saved as drawing Y, closed drawing Y (there is no drawing X open anymore!!!), closed program, started program, opened drawing X, closed drawing X, closed program, and the drawing X still has the same old Date Modified and the original file size.
Dempsey

Lar

#6
Dempsey, I just checked in v23 with a drawing I was just closing session on and file A was left stuck with the inflated data (ie, file A was twice the size of file B). I opened and closed file A (without doing anything to it) and its size was reduced to match file B and the date was changed to when the file was closed (the 2nd time).

I would suspect that you did all of your stuff within one minute and with the addition of a single line and Windows not reporting the 100% accurate file size then the exact difference between the two files were not apparent.

Try again with a somewhat large file and duplicate everything a few times, then give it a few minutes before you save and save as (maybe you should save as twice to 2 new names so you don't ruin you original file).

Lar

DrollTroll

The date and time change only if the file will be shrunk by resaving. If it's already been opened/closed and shrunk, and no changes were made, it won't change the date and time. This whole thing is kind of a trade-off -- do you want DesignCAD to take the extra time to do this when you first save the drawing (may make saving larger files take longer), or do it invisibly when you next open the drawing. There're arguments to both ways, and we tried to take the least intrusive route.
25 years with DesignCAD

Lar

DT,

Does it take that much longer to shrink the file. I'm asking because when I open and close an inflated file I don't ever see any hesitation of the computer, no matter the size (my files are no where as large as Dr. PR's mega files, but then neither is anybody else's).

The problem with shrinking when the file is next opened is that that could be years later and at that time the date when it was last actively worked on becomes extremely important, sacred even. Not only that, but the inflated filesize is using up unnecessary storage space. And that could involve hundreds of thousands of files over the years. Imagine the unnecessary time it takes to back up all of that unnecessary data (and the longer a backup takes -to backup as well as restore- the better chance for something to go wrong. Then, if you should decide storage space is more important than filedates, imagine the effort it would take to open and close all of those files and all of their backups, and their backups. And in the future we are headed for, ie, unless we come up with un-erasable, incorruptible and indestructible data storage, backups will become more important than money.

All that for a few mili-seconds each time we save a file...

Lar,
a.k.a. the Stephen King of DesignCAD
(except that much of Stephen King's writing is still fantasy but my writings have already come to pass)

Dr PR

I think the excess baggage should be removed from the file every time it is saved. This would eliminate the problem.

However, one of the feature requests I have made is for an option to save the shading information with a file when it is saved. It can take 60-90 minutes to shade a large file the first time after it is opened. After this it takes only seconds to regenerate the shaded image. Saving this information would make working with large files much faster. If this option is chosen the shading information should be saved with the file every time it is saved. Backup information could be purged.

Phil
DesignCAD user since 1987

samdavo

#10
An interesting read gents (albeit a quick read).

Hope I'm understanding this correctly:-
Imagine Henry Ford with a file named  "proforma 1928 Ford.dcd", file dated 1928 obviously;
then he
a. opens it
b. changes it, eg adds airbags
c. saves it as "2013 Ford based on 1928 Ford with airbags.dcd"
d. and closes DCAD ...
I believe you are saying that next time he opens his "proforma 1928 Ford" file, it is dated 2013?
( as is the 2013 Ford file?)
Or maybe you are saying the time AFTER the next time you open the "1928 Ford" file it has "unpurged" and autosaved dated 2013?

edit - sorry I can't simulate this problem to understand it better. - in V22 anyway

Is this a problem only prior to V18?

samdavo

Quote from: Lar on August 01, 2013, 12:10:32 PM
The only way to avoid this problem is to, upon finishing a working session and after saving and closing the file you are working on, open the other version of the file and close it. This would purge the undo data so the next time you open it dcad would not have to purge it.
Lar
Lar
This looks like it wouldn't be an insurmountable bit of self discipline. (2 cents)
And you are saying it keeps the 1928 Ford file date unchanged (?)

Dempsey

Okay guys, here I go again.

QuoteQuote from Lar: Try again with a somewhat large file and duplicate everything a few times, then give it a few minutes before you save and save as (maybe you should save as twice to 2 new names so you don't ruin you original file).

Lar, you said give it a few minutes before you save and save as...  Of course when you save you overwrite the original file!!! Save as creates a new file and does not impact the original file.

Opened old drawing AAA.dcd (2,080 KB, date modified 19/07/2013 16:46), copied and pasted the whole drawing, saved it as drawing BBB.dcd (4,089 KB, date modified 06/09/2013 20:53), closed drawing BBB.dcd (there is no drawing AAA.dcd open anymore!!!), closed program.

Started program, opened drawing AAA.dcd, closed drawing AAA.dcd, closed program, and the drawing AAA.dcd still has the same old Date Modified and the original file size!!!

Started program, opened drawing BBB.dcd, closed drawing BBB.dcd, closed program, and the drawing BBB.dcd still has the same Date Modified and the same (large) file size as when it was created!!!

Started program, opened drawing BBB.dcd, deleted 50%, saved it as drawing CCC.dcd (2,080 KB, date modified 06/09/2012 21:08), closed rawing CCC.dcd (there is no drawing BBB.dcd open anymore), closed program. BBB.dcd was not modified!!!
Dempsey

Lar

Quote from: samdavo on September 06, 2013, 04:42:37 PM
And you are saying it keeps the 1928 Ford file date unchanged (?)
It would change the date... to a few minutes later, which is acceptable, unless that minute took me past midnight and I have to prove to someone that I finished on a particular day, and not the day following (which would be totally ridiculous but you get the point).

Quote from: samdavo on September 06, 2013, 04:42:37 PM
This looks like it wouldn't be an insurmountable bit of self discipline. (2 cents)
Self discipline isn't the key. It's rememberance, if there's such a word. If you forgot to do the manual purge then dog eat your lunch.

Here's the scenario: when having to reference a few file that I last worked on, say 8-10 years ago (which I had to do just a few months ago) I, of course, must open them. I go searching through the file list which is sorted by date, so the later ones would be the ones I last worked on. I know that once I open an inflated file the date will be changed to today's date but I don't know which ones are inflated. I'm also aware that I may have opened an earlier inflated file some time later and the date was changed then so I am never 100% confident that what I think is later is actually later. Heck, I may have opened the later file 4 years ago and the date was changed so the latest file may not be among the ones I am searching. So, although I'm looking for the latest file I may never find it and may never know (actually, once I found a file I would then sort by name to see if any similar name is at another time. I may also search for the common part of the name in case one of the set was not saved with the same first letter). I then must either: 1] make a duplicate of each of the files and open them so if any are inflated the original dates remain intact with the original files, or 2] I must append the date of each of the files to the filename so if any are inflated I have a record of the proper date, or 3] make the file read only (as MarkX suggested), which protects the file from being written to. In the mean time, for every time you backed up those inflated files you are being robbed of storage space.

Lar

Lar

#14
Quote from: Dempsey on September 06, 2013, 08:02:35 PM
Of course when you save you overwrite the original file!!! Save as creates a new file and does not impact the original file.

..., closed drawing BBB.dcd (there is no drawing AAA.dcd open anymore!!!), ...
Dempsey,

It would be unfair to Windows to say that is the cause of the problem so I'll put it this way: This is the platform upon which the problem festers.

Remember, you must do some work on the file, save it, then save as. This is a quick way of generating two up-to-date working files so if one gets messed up for whatever reason you have another to work on. You can also achieve this with enabling saving backup files but, alas, the same thing happens with the bak file. Since the bak file was never closed dcad never gave itself a chance to purge the bak file. So it sits on your hard drive like a 2-way booby trap. First it sits there using twice as much storage space as necessary. Meanwhile, it's waiting for a circumstance to arise in which you have to access the bak file (ie, by changing the bak to dcd and opening it) and then it trades the wasted storage space for an incorrect date. Then it probably does one of those evil silent smirks.

If you are up for a little experiment, try the following:
First you must do enough work in a file so that dcad allocates undo space to it, which just about doubles it. I'm not sure at which point dcad would do this.

Second you must save the file (so if this is AAA.dcd it is now saved with the inflated data).

Third you must save as (save as AAA2.dcd. Now AAA and AAA2 are both inflated).

Now close dcad. Wait... before closing think of a new password and type it in the file. Now save and close... wait, before closing save as to AAA, for backup.

Now, for the sake of this demonstration change the password, save the file and then let something distract you, like an important phone call reminding you of a meeting you have to dash off to, so you close the file without saving as (this would purge AAA file but since AAA2 was never closed it is still inflated, and it contains the incorrect password).

When you get back from the meeting open Windows Explorer and find the folder where you saved the files. You would see that AAA2 is twice as big as AAA.

Now, wait about a week (enough time to forget the password) and open file AAA2 and immediately close it. This would purge AAA2 and date it a week later.

Now, wait about another week (enough time to forget most of what you did today except that the new password is in the later file... and lets pretend you are unaware that the date of AAA2 was changed - which would really happen since you are unaware of this issue) and try to find the password while only remembering the file you typed it in had AAA in the name. Searching for the file by name would find AAA and AAA2. Checking the dates would show that AAA2 is the later file. The fact that there is a difference of a week between the file dates means nothing to you. Open AAA2 and there is your password, right.... wait, that doesn't look quite like it. So open AAA and there's another password. This one looks more like it but it can't be this one because this is the earlier file. Now imagine instead of a password the last worked on file contained the latest changes of a project and now you are not sure which file to continue working on.

I guess you guys don't work between a 'save' and a 'save as' file since you are unaware of this issue. Sometimes, when I wake up with a distrust for dcad, I work between 3 files, saving, then saving as to the earliest of the 3 files. This way there is always a file that is not completely up to date in case dcad corrupts the other 2 files and I have something to salvage. When I really distrust dcad I open the last save file in another instance of dcad so if it's corrupted I know before I completely close the file and can investigate as to what caused the corruption and correct it (which has actually happened to me before).

Lar