I have to create a new featureClass in my existing personal GeoDatabase. And save some polylines into this featureClass.
How can i do it?
I need c# code to do this.
Edit: I have a problem during Geometry type featureClass creation. Here the code i'm using:
IFields fields = objectClassDescription.RequiredFields; ESRI.ArcGIS.Geodatabase.IFieldsEdit fieldsEdit = ESRI.ArcGIS.Geodatabase.IFieldsEdit)fields; // Explicit Cast ESRI.ArcGIS.Geodatabase.IField field = new ESRI.ArcGIS.Geodatabase.Field(); ESRI.ArcGIS.Geodatabase.IFieldEdit fieldEdit = (ESRI.ArcGIS.Geodatabase.IFieldEdit)field; fieldEdit.Name_2 = "Shape"; fieldEdit.Type_2 = ESRI.ArcGIS.Geodatabase.esriFieldType.esriFieldTypeGeometry; fieldEdit.IsNullable_2 = true; fieldEdit.AliasName_2 = "SampleShap"; fieldEdit.DefaultValue_2 = "test"; fieldsEdit.AddField(field); fields = (ESRI.ArcGIS.Geodatabase.IFields)fieldsEdit; ESRI.ArcGIS.Geodatabase.IFieldChecker fieldChecker = new ESRI.ArcGIS.Geodatabase.FieldChecker(); ESRI.ArcGIS.Geodatabase.IEnumFieldError enumFieldError = null; ESRI.ArcGIS.Geodatabase.IFields validatedFields = null; fieldChecker.ValidateWorkspace = (ESRI.ArcGIS.Geodatabase.IWorkspace)workspace; fieldChecker.Validate(fields, out enumFieldError, out validatedFields); IFeatureClass featureClass = featureWorkspace.CreateFeatureClass("Test01", validatedFields, null, null, ESRI.ArcGIS.Geodatabase.esriFeatureType.esriFTSimple, strShapeField, ""); I get this error:
The module of database management can't find the table or the input query 'GDB_DataChanges' How can i solve it?
أكثر...
How can i do it?
I need c# code to do this.
Edit: I have a problem during Geometry type featureClass creation. Here the code i'm using:
IFields fields = objectClassDescription.RequiredFields; ESRI.ArcGIS.Geodatabase.IFieldsEdit fieldsEdit = ESRI.ArcGIS.Geodatabase.IFieldsEdit)fields; // Explicit Cast ESRI.ArcGIS.Geodatabase.IField field = new ESRI.ArcGIS.Geodatabase.Field(); ESRI.ArcGIS.Geodatabase.IFieldEdit fieldEdit = (ESRI.ArcGIS.Geodatabase.IFieldEdit)field; fieldEdit.Name_2 = "Shape"; fieldEdit.Type_2 = ESRI.ArcGIS.Geodatabase.esriFieldType.esriFieldTypeGeometry; fieldEdit.IsNullable_2 = true; fieldEdit.AliasName_2 = "SampleShap"; fieldEdit.DefaultValue_2 = "test"; fieldsEdit.AddField(field); fields = (ESRI.ArcGIS.Geodatabase.IFields)fieldsEdit; ESRI.ArcGIS.Geodatabase.IFieldChecker fieldChecker = new ESRI.ArcGIS.Geodatabase.FieldChecker(); ESRI.ArcGIS.Geodatabase.IEnumFieldError enumFieldError = null; ESRI.ArcGIS.Geodatabase.IFields validatedFields = null; fieldChecker.ValidateWorkspace = (ESRI.ArcGIS.Geodatabase.IWorkspace)workspace; fieldChecker.Validate(fields, out enumFieldError, out validatedFields); IFeatureClass featureClass = featureWorkspace.CreateFeatureClass("Test01", validatedFields, null, null, ESRI.ArcGIS.Geodatabase.esriFeatureType.esriFTSimple, strShapeField, ""); I get this error:
The module of database management can't find the table or the input query 'GDB_DataChanges' How can i solve it?
أكثر...