Command WR PICTURE TO AREA

4D Write

WR PICTURE TO AREA

version 6.5


WR PICTURE TO AREA (area; picture)

ParameterTypeDescription
areaLongint4D Write area
picturePictureField or variable

Description

The WR PICTURE TO AREA command allows you to read a picture variable or a picture field that contains a 4D Write document and to open it in the 4D Write area referenced by area. area can either be an area currently displayed or an offscreen area.

This command allows you, for instance, to read 4D Write documents that were saved in different tables.

Note: This command also reads the 4D Write version 6.0.x file format.

Examples

(1) You want to load a letter template stored in the "[Templates]Reference" Picture field and use it as the current template:

   QUERY([Templates];[Templates]Reference=Ref)
   If(Records in selection([Templates])>0)
      WR PICTURE TO AREA(Area;[Templates]Reference_)
   End if

(2) You want to copy the text stored in the "[Templates]TheText_" Picture field and paste it in the current area on screen. This example shows you how to create an advanced glossary system:

   Temp:=WR New offscreen area
   WR PICTURE TO AREA (Temp;[Templates]TheText_)    `Expanding the field
   WR EXECUTE COMMAND(Temp;wr cmd select all)
   WR EXECUTE COMMAND(Temp;wr cmd copy)
   WR DELETE OFFSCREEN AREA (Temp)    `Deleting the area
   WR EXECUTE COMMAND(Area;wr cmd paste)    `Executing the Paste menu command

Note: If you store 4D Write areas in BLOB fields, please refer to the description of the command WR BLOB TO AREA.

See Also

WR Area to picture.