I am trying to use the Map Exporter class in vb.net. i can get it to export Points, but where do you change the setting to Line, or text or anything else. I have run through the documentaiton but unable to find anything. This is what i have.
Dim mapSession AsMapApplication = HostMapApplicationServices.Application
Dim exporter AsExporter = mapSession.Exporter
exporter.Init("SHP", filename)
Dim dataMapping AsExpressionTargetCollection = Nothing
dataMapping = exporter.GetExportDataMappings()
'Set Object Data data mapping if table is true
If isTable AndNot MapODData(dataMapping) Then
log.WriteLine("Error in mapping OD table data!")
EndIf
exporter.LayerFilter = layerFilter
Dim results AsExportResults
results = exporter.Export(True)
Can anyone help please
Hi,
look behind this:
Dim tExpGeomType As Map.ImportExport.GeometryType Select Case GeomType Case "POINT" : tExpGeomType = Map.ImportExport.GeometryType.Point Case "ARC" : tExpGeomType = Map.ImportExport.GeometryType.Line Case "POLYGON" : tExpGeomType = Map.ImportExport.GeometryType.Polygon : tExporter.ClosedPolylinesAsPolygons = True Case Else : tExpGeomType = Map.ImportExport.GeometryType.Point End Select exporter.SetStorageOptions(Map.ImportExport.StorageType.FileOneEntityType, tExpGeomType, "AA")
HTH, - alfred -
Thank you. That is what i was looking for. do you know how to exclude layers using the layerfilters? I want select all layers except for a few of them. Like a NOT feature.