ThinkGeo.com    |     Documentation    |     Premium Support

Create new Tab File from MemoryFeatureLayer

Hello,



How can I create a new Tab File from the MemoryFeatureLayer object.



Thanks in advance.

Hi Syarief, 
  
 Could you please try the codes below to see if it is what you want? 
 
InMemoryFeatureLayer inMemoryLayer;\This is InMemoryFeatureLayer.
TabFeatureSource.CreateTabFile(@"D:\US.tab", new TabDbfColumn[] { new TabDbfColumn("Id", DbfColumnType.String, 100, 0, false, true) }, inMemoryLayer.InternalFeatures);
TabFeatureLayer.BuildIndexFile(@"D:\US.tab", BuildIndexMode.DoNotRebuild);

 
 
 Thanks, 
 Johnny 
  


Thanks a lot johnny,



but now I changed my mind to save it to shapefile (shp).



Can I use the code in this link Create Shapefiles From Scratch ?



Thanks.

Hi Syarief, 
  
 I think the sample code in "Create Shapefiles From Scratch" will works for you. 
  
 Our main APIs has been little change for keep steady. 
  
 Regards, 
  
 Don

Thanks Don.

Syarief, 
  
 If there is any other question, don’t hesitate to let us know. 
 Regards, 
  
 Johnny