MapInfo Technical Tips
Technical Tips
 

 

Overview

The manual doesn't cover it. Your tech support contract has expired and management won't let you renew it. This is the place for you. 
Submit new questions and get answers posted here.


 
  Labels

Re-use custom or automatic labels via a separate label point map

You've changed positions of your "automatic" labels and saved your workspace.  But now you want to use these re-positioned labels with other workspaces. 

1.  Save your workspace-specific labels, both the "automatic" labels and labels you've moved or otherwise customized, into a separate map layer composed of "text" objects.
2.  Convert the "text" object layer into a point layer, with the text as a table value.
3.  Turn on the "automatic" labels for the new point layer. 

1.  Save your workspace-specific labels:
Use the Labeler.mbx tool (Tools > Tool Manager...) to save automatic and customized labels. [Not Autolabeler.mbx!]
Lbl_Fctns.GIF (3640 bytes)

Specify a new table into which the labels will be saved:

TraLbl_Dlg.GIF (3347 bytes)

Check your Layer Control dialog.  You'll see that you now have a new map layer, containing only text objects.  You can make this layer editable and move the text around to your hearts content.  You can also use this permanent layer with other maps and workspaces.

This may be all you need to do.   For maximum flexibility, though, considering converting the text objects into point objects with text values in the associated table. 

2.  Convert the "text" object layer into a point layer (e.g., "Lbl_Txt.tab")
a.  Use Table > Maintenance > Table Structure ... to add a column (eg., "Text_for_Label") to the text object layer.  Define the column to be Character (not Float, Decimal, etc).  This column will hold the text values that are now in Lbl_Txt.tab as text objects.  Note:  If your labels disappear when you do this, don't worry.  Use Layer Control to re-add the Lbl_Txt layer to the map.
b.  Use Table > Update Column ... to fill-in the Text_for_Label column values.   You need to use the ObjectInfo expression illustrated below.  This is a MapBasic function, but you do not need to have the MapBasic program.

UpdObjInfo.GIF (4190 bytes)


c.  Use the MapBasic window to convert your text object in Lbl_Txt.tab into point objects.

Open the MapBasic window via Options > Show MapBasic window ...       Type in the following command:

Update Lbl_Txt Set obj = CreatePoint(CentroidX(obj),CentroidY(obj))   <Enter>

The above command makes a point object at the center of the text object.  Sorry, you cannot do this via the Update Table dialog.

3.  Turn on the "automatic" labels for the new point map.

Use the standard Layer Control options to specify the "Text_for_Label" column as the source of the labels.  Check the checkbox to cause the labels to display dynamically.  You'll probably also want to set the point symbol for Lbl_Txt to "None".  Now your labels are in the right place; they are in a permanent map layer; and they will "scale" like normal automatic labels.

For more information about label issues, tricks and traps, click here.

Making 2-line labels

Three options:

  • Dbl-click on each label; edit each label to add the "Carriage return" character. These types of changes get saved in your Workspace only [assuming you save one]. Alternatively, you could save all your "custom labels" into a new permanent map layer using the labeler.mbx [supplied with MapInfo 4.1+]

  • Use Table > Update Column to change the column values that are used as a label. You would change the value to include a "Carriage return" symbol after the first word, for example. These changes are permanently in your data table, so can be used with many separate projects having many different workspaces. You can manually adjust the position of the "Carriage return" character on a record-by-record basis, if you choose, and all these tweaks are also saved when you save your table.

  • Make an Expression for the Label. The expression can dynamically "break" the label, as these labels are created and displayed by MapInfo. The label expression definition can be saved in a workspace. For other projects, you would re-enter an analogous expression.

Using "Update Column" to Make 2-line labels
The menu command illustrated below does the following:

  • Changes each value of column SGSINAME in the TMP table.

  • Looks for the position of any space in the value of SGSINAME [cf Instr()]

  • Insert a "Line feed" character in place of the first space it finds. The "Line feed" character is Chr$(10).

  • Composes the final value as the part of the name that came before the "space", plus the "line feed" character, plus the part of the name that followed the space.

  • Note #1: This exact command will insert a "line feed character" where the name has *no* embedded spaces. If this is a problem, select all records *with*
    embedded spaces first. Then run the Update Column command on just these.

  • Note #2: The "line feed" character will appear in your "browser" as a thick vertical bar of sorts. You can use "cut" and "paste" to move this character around.


Using a label Expression to Make 2-line labels


Use Layer Control to pick the map layer and click on the Label button

  • As a label source, pick "Expression" instead of any column name.

  • Enter the expression shown above, modified of course to use your table and column names.

Before:
"Colonia Presbitero Fidel Maiz"

After:
"Colonia
Presbitero Fidel Maiz"


   
Printing

Calibrate printer colors with MapInfo's color palette

How come the printed colors don't match the colors I see on my screen?  Whatever the reasons, why not print the MapInfo Color palette on your printer to see how the colors will actually print.  Here is a free map layer and MapInfo workspace file that lets you do so.  Download now; uncompressed the file; then, fire up the Workspace from within MapInfo Pro: 
SGSI_ColorPalette.zip (8k); OR
SGSI_ColorPalette.exe (33k.  This version is identical to SGSI_ColorPalette.zip but does not need WinZip
).

There are many possible reasons for color differences, each with its own solution:

  • Are your monitor color settings correctly set on the monitor itself?  Check your monitor manual and/or the monitor controls.

  • Is your printer ink cartridge running out?  Toward the end of the ink cartridge's life, the density of ink (and therefore the color) can change.   Run a test pattern process on your printer.  Look at ink cartridge full/empty indicators on your printer/cartridges.

  • Are you using a "solid" fill pattern in MapInfo and not a cross-hatched or other type of fill?  Different printers create fill patterns differently.  The result can be distinctly different hues and "look" especially if your monitor Display settings are at 256 colors.  To check your monitor display settings: 
    Start > Control Panel > Display > Settings ...
    Don't change your settings unless you are a power user or have approval from your PC support staff.

    ColorPalette.GIF (10850 bytes)

 

Printing halo text on HP LaserJet printers

Adding "halos" to text makes the text more readable.  But try it with HP LaserJet printers and you might just see the halo (blank space) and *no* text.  The problem is caused by printer driver default settings for HP Laser printers.  The fix varies slightly depending on whether you are running Windows 3.1, Win95, or Windows NT but the concept is the same:  change a setting in the printer setting dialog. 

In Windows 95:  Use     START > Settings > Printers    highlight the HP Laser Printer icon & display the printer properties with File > Properties or [Right-MouseClick]:

HPLaserFontSetup.GIF (8501 bytes)

Make the "Fonts" tab of the dialog come to the front, then select "Print TrueType as graphics" .  This is NOT the default selection.  Your halo-type text should now print just fine.

In Windows NT, Rev. 4.x:  Use    START > Settings > Printers    highlight the HP Laser Printer icon & display the Advanced printer settings with File > Document defaults ...[not File > Properties].

HPLaserFontNT4.GIF (10236 bytes)

Make the "Advanced" tab of the dialog come to the front, then scroll down and select "Print TrueType as graphics" .  Hint:   It is under "Document Options".  This is NOT the default selection and it is certainly buried isn't it?  Your halo-type text should now print just fine.
 

Terms of use | Trademarks | Browsers | SGSI Home | Top of page | Email | Map to Seattle office (pdf) | www.sgsi.com
Schlosser Geographic Systems, Inc. (SGSI) One Union Square, 600 University Street, Suite 3012, Seattle, WA 98101 USA
Seattle 206-224-0800 | Vermont 802-224-7111 | Hawaii 808-585-1100 | Oregon 503-224-0400

©SGSI 1995-2005.  Rev 2003.1