Subscribe to this thread
Home - General / All posts - Date stamping a kml file, Manifold 8
578 post(s)
#10-Sep-18 21:52

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.


1,264 post(s)
#11-Sep-18 13:38

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:

Sub Main

    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


comps.Remove qs1

End Sub


1,264 post(s)
#11-Sep-18 13:39

I miss this stuff, got to get back into 9 testing soon!

Manifold User Community Use Agreement Copyright (C) 2007-2017 Manifold Software Limited. All rights reserved.