MapWinGIS:ShapeNetwork DeleteShape
From MapWindow GIS
DeleteShape
Deletes a shape from the shape network.
VB.NET Usage
Function DeleteShape(ShapeIndex As Integer) As Boolean
Parameters
|
ShapeIndex | The index of the shape to be deleted from the shape network. |
| ReturnValue | A boolean value representing the success or failure of deleting the shape from the shape network. |
Sample Code
Private Sub DeleteNetworkShape()
Dim sf As New MapWinGIS.Shapefile()
Dim shapenetwork As New MapWinGIS.ShapeNetwork()
Dim result As Integer
'Open a line shapefile
sf.Open("C:\test.shp")
'Build a shape network from the shapefile using shape 0 as the outlet shape and point 0 in shape 0 as the outlet point
result = shapenetwork.Build(sf, 0, 0, 10, MapWinGIS.AmbiguityResolution.DISTANCE_TO_OUTLET)
'Delete shape 0 from the shape network
shapenetwork.DeleteShape(0)
End Sub
VB 6 Usage
Function DeleteShape(ShapeIndex As Long) As Boolean
Parameters
|
ShapeIndex | The index of the shape to be deleted from the shape network. |
| ReturnValue | A boolean value representing the success or failure of deleting the shape from the shape network. |
Sample Code
Private Sub DeleteNetworkShape()
Dim sf As New MapWinGIS.Shapefile
Dim shapenetwork As New MapWinGIS.shapenetwork
Dim result As Long
'Open a line shapefile
sf.Open ("C:\test.shp")
'Build a shape network from the shapefile using shape 0 as the outlet shape and point 0 in shape 0 as the outlet point
result = shapenetwork.Build(sf, 0, 0, 10, MapWinGIS.AmbiguityResolution.DISTANCE_TO_OUTLET)
'Delete shape 0 from the shape network
shapenetwork.DeleteShape (0)
End Sub
















