/ All posts
- Date stamping a kml file, Manifold 8
How can I embed the export date into a kml file?
Every week I export a KML file with the parcel ID number and some complicated html code into the export. I was thinking about creating a dummy parcel where the ID number is the date 20180910, for example. Then I can open the parcel in Google Earth and determine the export date of the file. Does anyone have an idea for something more automatic or clever?
For years I have included the date into the file name, so I could tell which version of my map someone is using. Now I'm trying to get a little more clever with my KML files by making them update automatically, but the file name has to be the same from update to update for this to work. So this date thing is just for troubleshooting.
We use long integer fields/columns to date our files to keep track of incoming/outgoing files, never thought of scripting it though, after five minutes I came up with this:
set doc = Application.ActiveDocument
set comps = document.componentSet
IsoDate = Right(CStr(Year(Date)),4) & Right("0" & CStr(Month(Date)),2) & Right("0" & CStr(Day(Date)),2)
set qs1 = document.NewQuery("UpdateDateInt", False)
' Application.MessageBox IsoDate
qs1.text = "UPDATE [Drawing] SET [Date_Int] = " & IsoDate