ThinkGeo.com    |     Documentation    |     Premium Support

Creating a * .tab file failed

Tell me please. I want to create a * .tab file. Inside the “CalculateCenterPointSample” example in “HowDoISample”, I added the code

//Set the map extent to the censusHousing layer bounding box
censusHousingLayer.Open();

//----------------------------------------------------------
var ids = censusHousingLayer.FeatureSource.GetFeatureIds();
Collection<string> databaseColumns = new Collection<string>();
Collection<TabDbfColumn> columns = new Collection<TabDbfColumn>();
Collection<Feature> features = new Collection<Feature>();
foreach(string id in ids)
{
Collection<string> cols = new Collection<string>();
features.Add(censusHousingLayer.FeatureSource.GetFeatureById(id, cols));
}
TabFeatureLayer.CreateTabFile(“1.tab”, columns, features);
//----------------------------------------------------------

mapView.CurrentExtent = censusHousingLayer.GetBoundingBox();

The program closes, does not work. ((

Hi Serg,

Thanks for the code to recreate the issue. I’ve been able to recreate it and will work on a fix. I’ll keep you posted on the progress.

Thanks,
John