Hi Randy,

Thank you!

I only have two versions to work with for the client. 4D v12 and 4D v17. So if 
these routines work in 4D v12 I might just try it there.

I’ll try it again tomorrow with fresh eyes.

Appreciate,
John...

> On May 14, 2019, at 3:29 PM, Randy Jaynes <ra...@printpoint.com> wrote:
> 
> John,
> 
> Not sure about the component you mention, but you most likely have to run 
> this in a 32bit version of v17 in order for it to work.
> 
> I worked through this by creating a method in my v13 structure doing this:
> 
>   
> //-----------------------------------------------------------------------------------------------------
> ALL RECORDS([Letter])
> 
> $numRecs:=Records in selection([Letter])
> $numRecsStr:=String($numRecs)
> 
> $wr_letter:=WR New offscreen area 
> $path:=Util_File_getPathName (Structure file)+"Letters"+Folder separator
> If (Test path name($path)#Is a folder)
> CREATE FOLDER($path)
> End if 
> 
> For ($i;1;$numRecs)
>    If (Picture size([Letter]WR_Letter_)>0)
>         
> //-----------------------------------------------------------------------------------------------------
>         //--------------------- LOAD THE LETTER INTO AN OFFSCREEN AREA 
> ---------
>         
> //-----------------------------------------------------------------------------------------------------
>         WR PICTURE TO AREA ($wr_letter;[Letter]WR_Letter_)
> 
>         
> //-----------------------------------------------------------------------------------------------------
>         //--------------------- SAVE THE AREA TO A DOCUMENT      
> -------------------------
>         
> //-----------------------------------------------------------------------------------------------------
>         //must have the .4W7 or the WP IMPORT DOCUMENT command will fail in 
> v16+
>       $fileName:=$path+"Letter_"+String([Letter]Letter_PK)+".4w7"
>       WR SAVE DOCUMENT ($wr_letter;$filename;wr 4D Write document)
>    End if 
> 
>    NEXT RECORD([Letter])
> End for 
> WR DELETE OFFSCREEN AREA ($wr_letter)
>   
> //-----------------------------------------------------------------------------------------------------
> 
> The advantage here was that I had 4D Write in v13 exporting to its native 
> .4W7 files, and then 4D Write Pro in v17 was smoothly importing and 
> converting the letters.
> 
> Not sure if that will help any, but this process has worked well for dozens 
> of upgrades for our OEM database.
> 
> Randy
> 
> ----------------------------------------------------------------------
> Randy Jaynes
> Senior Programmer and Customer Support
> 
> http://printpoint.com <http://printpoint.com/> • 845.687.3741 • PrintPoint, 
> Inc • 57 Ludlow Lane • Palisades, NY 10964 
> Please send all email contacts to supp...@printpoint.com 
> <mailto:supp...@printpoint.com>
> <PrintPointMISLogo_20x43.png>
> 
>> On May 14, 2019, at 4:56 PM, John J Foster via 4D_Tech <4d_tech@lists.4d.com 
>> <mailto:4d_tech@lists.4d.com>> wrote:
>> 
>> Hi All,
>> 
>> 4D v17R4 Windows and Macintosh Stand alone and 4D Server
>> I do not have an old 4D Write plugin only the new 4D Write Pro
>> App upgraded from 4D 2012 to 4D V17
>> 
>> I am working on the final v17 conversion piece migrating older 4D Write 
>> saved in picture field to 4D Write Pro saved in object field. I am using the 
>> the code from the component on the blog 
>> "https://blog.4d.com/migrate-4d-write-documents-stored-in-picture-fields/#component
>>  
>> <https://blog.4d.com/migrate-4d-write-documents-stored-in-picture-fields/#component>”.
>> 
>> However, as I watch the code in the debugger, this is what I see:
>> 
>> $blob:=_Extract4W7From4DPicture ($1)
>> If (BLOB size($blob)=0)
>>      GET PICTURE FORMATS($1;$codecIDs)
>>      If (Size of array($codecIDs)=1)
>>              If ($codecIDs{1}=".pict”)
>>              !!! // makes it to here so “knows” it’s a pict.
>>                      $blob:=_Extract4W7FromMacPicture ($1)
>>              !!! // returns an empty blob
>>              End if 
>>      End if 
>> End if 
>> 
>> Inside this routine "Extract4W7FromMacPicture ($1)” this line executes
>> 
>> PICTURE TO BLOB($1;$blob;"PICT") 
>> 
>> Always returns an empty blob even though $1 is a picture with a size like 
>> 25ko.
>> 
>> So not sure what;’s going on and why it doesn’t work.
>> 
>> Does anyone have any experience with converting an older 4D Write saved in a 
>> picture field into a 4D Write Pro object?
>> 
>> Appreciate,
>> John…
>> 
>> 
>> 
>> 
>> **********************************************************************
>> 4D Internet Users Group (4D iNUG)
>> Archive:  http://lists.4d.com/archives.html 
>> <http://lists.4d.com/archives.html>
>> Options: https://lists.4d.com/mailman/options/4d_tech 
>> <https://lists.4d.com/mailman/options/4d_tech>
>> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com 
>> <mailto:4d_tech-unsubscr...@lists.4d.com>
>> **********************************************************************
> 

**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**********************************************************************

Reply via email to