version 6.0
DR GET RULER (area; baseU; scaleU; baseV; scaleV; divisions)
| Parameter | Type | Description | |
| area | Longint | 4D Draw area | |
| baseU | Integer | Base unit | |
| scaleU | Integer | Scale unit | |
| baseV | Real | Base value | |
| scaleV | Real | Scale value | |
| divisions | Integer | Number of minor divisions |
Description
The command DR GET RULER returns into the baseU, scaleU, baseV, scaleV, and divisions variables the setup for the ruler in area.
baseU describes the base units for area. The possible base units are inches (1), centimeters (6), or points (11). scaleU describes the scale units for area. scale units are displayed in the coordinates panel.
scaleU can be any of the possible unit types. baseV and scaleV describe the relationship between base units and scale units. One base unit corresponds to scaleV / baseV scale units. divisions describes the number of minor ruler divisions to display on screen.
The following table lists unit codes:
| Code | Unit |
| 1 | Inches |
| 2 | Feet |
| 3 | Yards |
| 4 | Miles |
| 5 | Millimeters |
| 6 | Centimeters |
| 7 | Decimeters |
| 8 | Meters |
| 9 | Decameters |
| 10 | Kilometers |
| 11 | Points |
Example
The following example displays an alert that shows the current scale for Area.
ARRAY STRING(20;aUnit;11)
aUnit{1} := "Inches"
aUnit{2} := "Feet"
aUnit{3} := "Yards"
aUnit{4} := "Miles"
aUnit{5} := "Millimeters"
aUnit{6} := "Centimeters"
aUnit{7} := "Decimeters"
aUnit{8} := "Meters"
aUnit{9} := "Decameters"
aUnit{10} := "Kilometers"
aUnit{11} := "Points"
DR GET RULER (Area;$BaseU;$ScaleU;$BaseV;$ScaleV;$Divisions)
$Temp := "The current scale is:" + Char(13) + "1"
$Temp := $Temp+aUnit{$BaseU}+" = " +String ($ScaleV / $BaseV)+" "+aUnit{$ScaleU}
ALERT ($Temp)
See Also