version 6.0
DR Calculate area (area; scope) Real
| Parameter | Type | Description | |
| area | Longint | 4D Draw area | |
| scope | Longint | -1 = All, 0 = Selected, >0 = Object ID | |
| Function result | Real | Surface area |
Description
The command DR Calculate area returns the surface area for the objects in area described by scope.
If scope equals -1, DR Calculate area returns the surface area of all objects in the document.
If scope equals 0, DR Calculate area returns the surface area of the selected objects.
If scope is greater than 0, it must be equal to a specific object's ID; DR Calculate area returns the surface area of the object.
If the object does not exist, DR Calculate area returns -3, and DR Error returns error code 2.
Example
The following example calculates the surface area of all objects in area.
$SurfArea := DR Calculate area (Area;-1)
See Also
DR Calculate perimeter, DR Get ID.