Is it possible to set the fieldmappings parameter for spatial-join (or another geoprocessor) from the sdk?
In Arcobjects you would use the IGPFieldMapping object and in Python the arcpy.FieldMappings object.
I Only want/need 1 field from join_features.
I can't find anything about this topic in the SDK documentation, and the community samples only use simple string based parameters.
Is there a renamed object that I'm missing, or is this functionality missing from ArcGIS Pro .Net SDK?
Removing/renaming the unused fields afterwards is not an acceptable workaround (There are way to many fields for this, and removing a field from the Geoprocessing framework is a lot slower than ArcObjects).
Thanks!
Solved! Go to Solution.
As a workaround I build a function that wil convert a list of my own FieldMapping Classes to a correct formatted string for the Geo processing parameter.
The parameters from the geo processing history gave me a clue on how to format the field mappings to text myself.
A decent ESRI solution would be preferable though. Because building the text on your own leaves room for errors, and you need to know the fields of both feature classes.
As a workaround I build a function that wil convert a list of my own FieldMapping Classes to a correct formatted string for the Geo processing parameter.
The parameters from the geo processing history gave me a clue on how to format the field mappings to text myself.
A decent ESRI solution would be preferable though. Because building the text on your own leaves room for errors, and you need to know the fields of both feature classes.
@GwenRoyakkers Any chance to get an example code on how you have resolved it?