[CommandMethod("test1")]
public void test1()
{
Importer importer = HostMapApplicationServices.Application.Importer;
importer.Init("MITAB", @"D:\work\tab\roads 28-В-г.TAB");
NameValueCollection nwc = importer.DriverOptions();
StringPair sp;
sp = new StringPair("META_MACROS", "SourceFME_TABLE_PASSWORD,,Source_MITAB_FULL_ENHANCED_GEOMETRY,YES,SourceENCODING,,SourceEXPOSE_ATTRS_GROUP,FME_DISCLOSURE_OPEN,SourceMITAB_EXPOSE_FORMAT_ATTRS,\"fme_basename, char(50) fme_color, char(50)\",SourceUSE_SEARCH_ENVELOPE,NO,SourceSEARCH_ENVELOPE_MINX,0,SourceSEARCH_ENVELOPE_MINY,0,SourceSEARCH_ENVELOPE_MAXX,0,SourceSEARCH_ENVELOPE_MAXY,0,SourceCLIP_TO_ENVELOPE,NO");
nwc.Add(sp);
sp = new StringPair("METAFILE", "MITAB");
nwc.Add(sp);
sp = new StringPair("RUNTIME_MACROS", "FME_TABLE_PASSWORD,,_MITAB_FULL_ENHANCED_GEOMETRY,YES,ENCODING,,EXPOSE_ATTRS_GROUP,FME_DISCLOSURE_OPEN,MITAB_EXPOSE_FORMAT_ATTRS,\"fme_basename, char(50) fme_color, char(50)\",USE_SEARCH_ENVELOPE,NO,SEARCH_ENVELOPE_MINX,0,SEARCH_ENVELOPE_MINY,0,SEARCH_ENVELOPE_MAXX,0,SEARCH_ENVELOPE_MAXY,0,CLIP_TO_ENVELOPE,NO,_MERGE_SCHEMAS,YES");
nwc.Add(sp);
importer.SetDriverOptions(ref nwc);
nwc = importer.DriverOptions();
foreach (InputLayer ilay in importer)
{
ilay.SetDataMapping(ImportDataMapping.NewObjectDataOnly, "test1");
}
importer.Import();
}