Old Write Document conversion

In one of our systems for a customer that has been with us since 1997, still has some 4D Write documents that are in the old Pre-V11 or 2004 format. Now, when you would open or save these in 4D Write in a version at least v14 and beyond, a dialog would pop-up asking if you wanted to Convert to the current format. One of the options with that Dialog was to check a box saying don’t ask me again, just convert, which was checked at some point. Now in v16.3 we have two problems.

  • We can’t make that dialog come anymore, it just auto converts them. Cannot find this preference or setting anywhere.
  • We don’t know how to find out which ones need converting and how to do it programmatically.

Anybody remember this and can help or point me in the right direction?

Thanks

According to the document “Conversion to 4D 2004”, 4D Write Document format was revised in 2004.2 (to use Unicode internally, I think), The most significant issue with documents created before v2003 (the first to support Mac OS X) was that the “print record” resource was using the Max OS 9 format.

https://kb.4d.com/assetid=43643

So the document gives this example:

C_BLOB(MyBlob)
MyArea:=WR New offscreen area
 MyBlob:=WR Print settings to BLOB (MyArea)
WR OPEN DOCUMENT (MyArea) 
bOK:=OK
While (bOK=1)
WR BLOB TO PRINT SETTINGS (MyArea; MyBlob;1) 
WR SAVE DOCUMENT (MyArea)
WR OPEN DOCUMENT (MyArea)
bOK:=OK
End while
WR DELETE OFFSCREEN AREA (MyArea)

But I suppose that’s not the information you are looking for.

If you convert a Write document to BLOB, you should probably see a 2-byte signature, either big-endian or lille, that indicates its document type,

According to source code, and if you choose to always convert without displaying the dialog, a ‘CONV’ resource will be set in 4D Write prefs file. Just remove this resource and the dialog will be prompted again.

1 Like

I understand the question is about v16 and legacy 4D Write, but for reference:

Commands in the “Resources” theme used to write in resources files must no longer be used; they will be removed from future versions of 4D.

https://doc.4d.com/4Dv18/4D/18/Resources.300-4505047.en.html

Perhaps it might just be easier to remove the pref file itself, as opposed to the specific resource.

The default does not contain CONV.

1 Like

Thank you, removing that file did restore the conversion prompt. Now I’ll test programmatic document conversion to see if that will resolve the issue as well.