| Maptitude GISDK Help |
Computes the ratio between two measurement units.
GetUnitSize(string a_unit, string b_unit)
| Argument | Contents |
|---|---|
| a_unit | The first measurement unit |
| b_unit | The second measurement unit |
A real number that is equal to the number of b_units in an a_unit.
GetUnitSize() works with both map and paper units, in any combination.
Both a_unit and b_unit must use the plural form (e.g., Miles, Inches, etc.).
inches_in_a_mile = GetUnitSize("Miles", "Inches")
curr_units = GetMapUnits("Plural") // What units are in use?
Five_miles = 5.0 * GetUnitSize("Miles", curr_units) // convert miles to current units
n = SelectByCircle(, "Several", Circle(ctr, Five_miles)) // select features within 5 miles
| Error Type | Meaning |
|---|---|
| Error | The measurement units are not valid |
| Function | Summary |
|---|---|
| GetMapUnits() | Gets the current map measurement units |
| SetMapUnits() | Sets the current map measurement unit |
| GetPaperUnits() | Gets the current paper measurement unit |
| SetPaperUnits() | Sets the current paper measurement unit |
| ©2025 Caliper Corporation | www.caliper.com |