Select to view content in your preferred language

Can anyone explain what the settings.json files control

1000
2
Jump to solution
05-05-2021 08:44 AM
BillSmith
Regular Contributor

I had a couple of users that couldn't use the automation API.  Once they edited one of these files it worked for them.  Are these controllable upon install.  I don't recall seeing any options to set any of these fields.  It appears the local one overrides the system setting.

Here are the contents of my C:\<install path>\ArcGIS\Earth\bin\automation\settings.json
{
"version": "1.12",
"autoStart": false,
"baseUrl": "http://localhost:8000"
}

And my C:\Users\<user.name>\Documents\ArcGISEarth\automation\settings.json
{
"version": "1.12",
"autoStart": true,
"baseUrl": "http://localhost:8000"
}

 

I never touched either of these files.  It just worked out of the box after installing it as a Windows Store App.

1 Solution

Accepted Solutions
ben_tan
Occasional Contributor

Hi Bill,

Thanks for the question. I will try to explain the settings.json of the Automation API in ArcGIS Earth. 

 

How does it work?

- settings.json in C:\Users\<user.name>\Documents\ArcGISEarth\automation folder will affect the setting of ArcGIS Earth Automation API. We need to change the value of "autoStart" to true to enable the API.
- settings.json in <install path> is just a backup file in V1.12. ArcGIS Earth will not load this file.
 

What happens when we installing or opening ArcGIS Earth?

We can see the C:\<install path>\ArcGIS\Earth\bin\automation\settings.json after installing ArcGIS Earth 1.12. And the value of "autoStart" is false by default in 1.12.

When we open the ArcGIS Earth, it will check whether the settings.json exists in the C:\Users\<user.name>\Documents\ArcGISEarth\automation folder. 

- If the settings.json already exists before installing earth 1.12, the version of settings.json will change to 1.12. Other settings will not change. So the value of "autoStart" might be true. So if you enabled Automation API in V1.11, you don't need to change the `autoStart` for V1.12.
- If the settings.json doesn't exist in the user folder. ArcGIS Earth will copy the settings.json from <install path> to <user folder>. And the value of "autoStart" will be false.
 

Are these controllable upon install?

For now, ArcGIS Earth doesn't support setting this during the installation. We need edit the settings.json in <user.name>\Documents\ArcGISEarth\automation. 

- During the first launching of the ArcGIS Earth, files about automation API will copy to the user folder. Then we can edit the settings.json here.
- Or we can edit the settings.json in <install path> before the first launching of ArcGIS Earth.
 

Hope the information is helpful. And we will add more details in our documentation in the future release.

 

Ben

View solution in original post

2 Replies
ben_tan
Occasional Contributor

Hi Bill,

Thanks for the question. I will try to explain the settings.json of the Automation API in ArcGIS Earth. 

 

How does it work?

- settings.json in C:\Users\<user.name>\Documents\ArcGISEarth\automation folder will affect the setting of ArcGIS Earth Automation API. We need to change the value of "autoStart" to true to enable the API.
- settings.json in <install path> is just a backup file in V1.12. ArcGIS Earth will not load this file.
 

What happens when we installing or opening ArcGIS Earth?

We can see the C:\<install path>\ArcGIS\Earth\bin\automation\settings.json after installing ArcGIS Earth 1.12. And the value of "autoStart" is false by default in 1.12.

When we open the ArcGIS Earth, it will check whether the settings.json exists in the C:\Users\<user.name>\Documents\ArcGISEarth\automation folder. 

- If the settings.json already exists before installing earth 1.12, the version of settings.json will change to 1.12. Other settings will not change. So the value of "autoStart" might be true. So if you enabled Automation API in V1.11, you don't need to change the `autoStart` for V1.12.
- If the settings.json doesn't exist in the user folder. ArcGIS Earth will copy the settings.json from <install path> to <user folder>. And the value of "autoStart" will be false.
 

Are these controllable upon install?

For now, ArcGIS Earth doesn't support setting this during the installation. We need edit the settings.json in <user.name>\Documents\ArcGISEarth\automation. 

- During the first launching of the ArcGIS Earth, files about automation API will copy to the user folder. Then we can edit the settings.json here.
- Or we can edit the settings.json in <install path> before the first launching of ArcGIS Earth.
 

Hope the information is helpful. And we will add more details in our documentation in the future release.

 

Ben

BillSmith
Regular Contributor

Thanks Ben.  That gives me some more detail.  I was programmatically copying the backup file over to the user settings, if it didn't exist.  While it looks like I don't need to do this according to your explanation, I am still reading the user file and overwriting it with true if it is false.