version 6.0
DR PICTURE TO AREA (area; picture)
| Parameter | Type | Description | |
| area | Longint | 4D Draw area | |
| picture | Picture | Picture |
Description
The command DR PICTURE TO AREA places into area the drawing contained in picture.
picture must be a valid 4th Dimension picture expression. picture can contain either a previously saved 4D Draw drawing or a picture. The contents of area are replaced with picture. If picture is empty, the command is ignored and DR Error returns error code 39.
Example
The following example sets up the current 4D Draw document based on a template picked from an element in an array:
QUERY([Templates];[Templates]Type=2) SELECTION TO ARRAY([Templates]DrawDoc;aTemplates)
The following is the object method for the aTemplates array:
CONFIRM("Replace current 4D Draw area?")
If (OK=1)
DR PICTURE TO AREA(Area;aTemplates{aTemplates})
End if
See Also