Set Paper Units statement - MapBasic - 2023

MapInfo MapBasic Reference

Product type
Software
Portfolio
Locate
Product family
MapInfo
Product
MapInfo > MapBasic
Version
2023
Language
English
Product name
MapBasic
Title
MapInfo MapBasic Reference
First publish date
1985
Last updated
2023-09-12
Published on
2023-09-12T16:32:32.686312

Purpose

Sets the paper unit of measure that describes screen window sizes and positions. You can issue this statement from the MapBasic window in MapInfo Pro.

Syntax

Set Paper Units unit 

unit is a string representing the name of a paper unit (for example, "cm" for centimeters).

Description

The Set Paper Units statement changes MapBasic's paper unit of measure.

Paper units are small units of linear measure, such as "mm" (millimeters). MapBasic's uses "in" (inches) as the default paper unit; this remains MapBasic's paper unit unless a Set Paper Units statement is issued.

Some MapBasic statements (for example, the Set Window statement) include Position, Width, and Height clauses, through which a MapBasic program can reset the size or the position of windows on the screen. The numbers that you specify in Position, Width, and Height clauses use MapBasic's paper units. For example, the Set Window statement Set Window Width 5 resets the width of a window. The window's new width depends on the paper unit in use; if MapBasic is currently using "in" as the paper unit, the Set Window statement makes the Map five inches wide.

If MapBasic is currently using "cm" as the paper unit, the Set Map statement makes the Map five centimeters wide.

MapBasic's paper unit is internal, and invisible to the end-user. When a user performs an operation which displays a paper measurement, the unit of measure displayed on the screen is independent of MapBasic's internal paper unit.

The Units parameter must be one of the values listed in the following table:

Unit name Paper unit represented Unit comparison
"cm" Centimeters 1 centimeter = 0.39370 inches, 10 millimeters, 2.36220 picas, 28.34646 points
"in" Inches 1 inch = 2.54 centimeters , 254 millimeters, 6 picas, 72 points
"mm" Millimeters 1 millimeter = 0.1 centimeters, 0.03937 inches, 0.23622 picas, 2.83465 points
"pt" Points 1 point = 0.01389 inches, 0.03528 centimeters, 0.35278 millimeters, 0.08333 picas
"pica" Picas 1 pica = 0.16667 inches, 0.42333 centimeters, 4.23333 millimeters, 12 points

See Also:

Set Area Units statement, Set Distance Units statement