version 6.0
DR Area to picture (area; scope) Picture
| Parameter | Type | Description | |
| area | Longint | 4D Draw area | |
| scope | Longint | -2=Document | |
| -1=All | |||
| 0=Selected | |||
| >0=ID | |||
| Function result | Picture | 4th Dimension picture of objects in area |
Description
The command DR Area to picture returns a 4th Dimension picture of objects in area.
The objects included in the picture are controlled by the scope parameter.
If scope equals -2, the entire document is copied. This includes document settings such as drawing size, ruler settings, and display options.
If scope equals -1, all objects in area are copied but without document settings.
If scope equals 0, only selected objects are copied.
If scope is greater than 0, it must equal a specific object's ID and only that object is copied. If the object does not exist, DR Error returns error code 2.
Example
The following example creates a picture array of the selected objects in Area. Each object becomes one element in the array.
$x := DR Count (Area;0)
`Count the number of selected objects
ARRAY PICTURE (aPict;$x)
`Declare picture array to hold objects
For ($i;1;$x)
`Loop for each selected object
$ID := DR Get ID (Area;0;$i)
`Get the selected object's ID
aPict{$i} := DR Area to picture (Area;$ID)
`Put object into array element
End for
See Also
DR Get ID, DR PICTURE TO CLIPBOARD, DR PLACE PICTURE.