version 6.0
DR ARRAY BASE TO SCALE (area; baseArray; scaleArray)
| Parameter | Type | Description | |
| area | Longint | 4D Draw area | |
| baseArray | Numeric Array | Array of base values | |
| scaleArray | Numeric Array | Array of scale values |
Description
The command DR ARRAY BASE TO SCALE converts an array of base values into an array of scale values according to the ruler setup in area. Both arrays must be numeric (Integer, Longint, or Real); they can even be the same array.
After a call to DR ARRAY BASE TO SCALE, scaleArray contains the same number of elements as baseArray. DR ARRAY BASE TO SCALE is especially useful when working with the commands DR POLYGON TO ARRAY, DR Array to polygon, DR ATTRIBUTE TO ARRAY, and DR ARRAY TO ATTRIBUTE. When you use this command, you do not have to convert each array element individually.
Example
The following example gets the coordinates of the vertices for the selected polygons and then converts them to scale units for display on screen. Note that in both calls to DR ARRAY BASE TO SCALE, the same array is used for baseArray and scaleArray.
DR POLYGON TO ARRAY (Area;0;ArrayH;ArrayV) DR ARRAY BASE TO SCALE (Area;ArrayH;ArrayH) DR ARRAY BASE TO SCALE (Area;ArrayV;ArrayV)
See Also
DR ARRAY SCALE TO BASE, DR GET RULER, DR SET RULER.