I'm creating a feature and I want to store it to a specific geodatabase. At the moment I'm using feature.Store() but it's not storing it to where I want. How do I specify a location?
I want to store it to C:\College Stuff\Dissertation\2009 stuff\Geo\Geo\Full_3D.gdb
I want to store it to C:\College Stuff\Dissertation\2009 stuff\Geo\Geo\Full_3D.gdb
Code:
Public Sub CreateFeature(ByVal layername1 As String, ByVal x As Double, ByVal y As Double, ByVal FeatureClass1 As IFeatureClass)
Dim cPoint As IPoint = New ESRI.ArcGIS.Geometry.Point
' To individually assign a value to the coordinates, use cPoint.X = x and cPoint.Y = y.
cPoint.PutCoords(x, y)
' Ensure the feature class contains points.
If FeatureClass1.ShapeType <> esriGeometryType.esriGeometryPoint Then
Return
End If
' Build the feature.
Dim feature As IFeature = FeatureClass1.CreateFeature()
feature.Shape = cPoint
' Commit the new feature to the geodatabase.
feature.Store()
End Sub