MapInfo Interchange Format .MIF Import Automation Options

 

When the program is driven from an automation script, an options string can be specified in the script that acts as the import options dialogs do in the program. The string consists of comma-separated parameters, which specify the behavior of the various import options.

 

Parameter

Type

Description

Filter

string

MIF

AreasToCurves

1 or 0

Whether to set all polygons to polylines. 0 does not set all polygons to polylines. 1 does.

IgnoreStyles

1 or 0

Whether to import without colors/fills/patterns etc. 0 does not import without the colors, fills, patterns, etc. 1 does import without these.

 

Example

This example shows how to import a MapInfo MIF file with the various options.

 

CommandApi.Construct("Import")

  CommandApi.Option("GuiEnabled", "False")

  CommandApi.Option("AutoConnect", "True")

  CommandApi.Option("ClearOptions", "False")

  CommandApi.Option("Filter", "mif")

  CommandApi.Option("Options", "AreasToCurves=1;IgnoreStyles=1")

  CommandApi.Option("Path", "C:/Path/To/Import/file.mif")

  CommandApi.Option("PersistOptions", "True")

CommandApi.Do() 

 

Used by: Import

 

 

See Also

Automation Model