ArcGIS 10.4. I am looking for a geoprocess to take an existing feature class and make it Z and M aware. The feature class is in a file geodb. I have been looking in the ESRI website but have not found anything that applies.
Edit: The solution was to copy the feature class with M and Z flags enabled, delete the original feature class, and rename the new feature class. Code looks like this:
Using releaser As New ESRI.ArcGIS.ADF.ComReleaser 'initialize the geoprocessor Dim GP As ESRI.ArcGIS.Geoprocessing.GeoProcessor = New ESRI.ArcGIS.Geoprocessing.GeoProcessor GP.AddOutputsToMap = False 'True if we want to add outputs to map, False if we dont. however we manually do this at the very end since the GP doesnt give us a layer reference. GP.OverwriteOutput = True 'True if output exists then will delete the old output before creating new output 'set environment settings to enable M and Z awareness GP.SetEnvironmentValue("outputMFlag", "Enabled") GP.SetEnvironmentValue("outputZFlag", "Enabled") 'create an IVariantArray to hold the parameter values Dim parameters As IVariantArray = New VarArray 'populate the variant array with parameter values parameters.Add(outGdbFeats) 'feature class or feature layer that will be converted parameters.Add(outDst) 'location in which the output feature class will be created parameters.Add(outGdbFeatsMz) 'name of the output feature class parameters.Add("") '(optional) SQL expression used to select a subset of features parameters.Add("") '(optional) fields and field contents chosen from the input feature class parameters.Add("") '(optional) configuration keywords 'execute the model tool by name Dim res As ESRI.ArcGIS.Geoprocessing.IGeoProcessorResult = GP.Execute("FeatureClassToFeatureClass_conversion", parameters, Nothing) End Using