Select to view content in your preferred language

Expiring KML's

542
2
07-21-2022 10:01 AM
lelaharrington1
New Contributor

Hello I am new to this community, I have KML's that I am creating, the problem is that I want these to expire, or not work after a certain time.  I would like the people to come back and get a refreshed version of the KML to ensure they are getting the latest and greatest of the data that we are using. This wat they are not using stale data is there any way that I can set this in the KML creation in the toolbox or a python script of a batch process to make the KML's expire and not work after a certain time?

Tags (4)
0 Kudos
2 Replies
jcarlson
MVP Esteemed Contributor

How exactly are you delivering your data to your end users? Couldn't you simply overwrite the existing file? I don't know that there's a way to make the file "expire", at least, not using any kind of built-in tools. You could have a script that looks at the file's creation date, and if it is older than some defined age limit, delete it.

- Josh Carlson
Kendall County GIS
0 Kudos
lelaharrington1
New Contributor

I found some information on how to make a KML expire. but I guess I was looking to see if that was something that could be put either in model builder or python. 

we get data requests and generate the required data, when the data is updated we then have to send out new KML's. sometimes this is on a yearly or quarterly basis, sometimes more. The problem I see with a KML is that it goes stale, and does not refresh to the most current data. So when a data request comes in and we answer the data request, what ever is out there is the current set of data used for a potential decision making tool. The thought came to set an expiration to the KML so make the user after a time (say like a month) come back and ask for new KML's if to ensure that they were getting updated data for decisions. even if this was simply we posted the data to a location for them to re grab it from. the expiration of the existing data would prompt that action. I was just curious on how to get this into the generation out of arc catalog, since we can export to python.

here is the expires script I found and here is the xml prompt I found to get it to start. I am not sure how to get them into the KML I guess.   

0 Kudos