DR GET RULER

4D - Documentation   Français   English   German   4D Draw 2004, Command Theme List   4D Draw 2004, Command Alphabetical List   Back   Previous   Next

version 6.0


DR GET RULER (area; baseU; scaleU; baseV; scaleV; divisions)

ParameterTypeDescription
areaLongint4D Draw area
baseUIntegerBase unit
scaleUIntegerScale unit
baseVRealBase value
scaleVRealScale value
divisionsIntegerNumber 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:

CodeUnit
1Inches
2Feet
3Yards
4Miles
5Millimeters
6Centimeters
7Decimeters
8Meters
9Decameters
10Kilometers
11Points

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

DR SET RULER.


4D - Documentation   Français   English   German   4D Draw 2004, Command Theme List   4D Draw 2004, Command Alphabetical List   Back   Previous   Next