AnsweredAssumed Answered

User inputs for FeatClass and CoordSys ???

Question asked by warpengine on Apr 25, 2020
Latest reply on Apr 28, 2020 by warpengine

Trying to work my way through my first add-in. One thing I am struggling with is user inputs. I have a DockPane where the user can input a path to their output feature class and the coordinate system of the output.



The user can input their desired data either by typing in the textbox or using the browse functions to fill that in for them. My struggle is to convert the contents of the textbox to usable objects.


For example, after the user either types in their coordinate system or uses the CoordSysDialog to choose it then how do I convert the result to a SpatialReference object? 


Same thing with the output feature class. From the textbox how do I determine if the feature class is a shapefile or a feature class in a geodb?


What are the best practices for these types of inputs? I see them in the ArcGIS Pro geoprocessing tools so there must be some way to validate each one and the proper type.