How to access an external file form ArcGIS Pro add-in

03-22-2019 01:22 PM
New Contributor III

o All,


I am using a config.JSON file with ArcGIS Pro to read some user-defined parameters and which are changeable by the user.


string path = String.Join("\\", System.Reflection.Assembly.GetExecutingAssembly().Location.Split('\\').Take(System.Reflection.Assembly.GetExecutingAssembly().Location.Split('\\').Count() - 1).ToArray())+ "\\Config.json";
string json = File.ReadAllText(path);
jsonData = JObject.Parse(json);


 I installed this add-in another system, then the user needs to change the .json file according to user local path and parameters.


I am not able to get the .json external exposed and it staying inside.esriAddinX. Even I alter the .json in .esriAddinX, it's correctpting.


Please may I know, how to use/Change content in JSON and add-in should read the data from .json.




Arun E

0 Kudos
0 Replies