Hey guys,
Does anyone know, how to get the date or maybe time of the last saved revit file though dynamo?
Thanks
Hey guys,
Does anyone know, how to get the date or maybe time of the last saved revit file though dynamo?
Thanks
You should access the protocol…
oh shoot !! Thanks Mate… I’ll give it a go !! and update if I succeed…
Thanks
i got this, but i am not shure if it is what are you looking for
import os, time
def getYYMMDD(filepath):
statbuf = os.stat(filepath)
date = time.localtime((statbuf.st_mtime))
# Debug
#print str(date)
# Extract out the year, month and day from the date
year = date[0]
month = date[1]
day = date[2]
# YY
strYear = str(year)[2:]
# MM
if (month <=9):
strMonth = '0' + str(month)
else:
strMonth = str(month)
# DD
if (day <=9):
strDay = '0' + str(day)
else:
strDay = str(day)
return (strYear+strMonth+strDay)
files = IN[0]
newlist = []
for file in files:
newlist.append(getYYMMDD(file))
OUT = newlist
you have to modify the script regarding
elements = IN[0] if isinstance(IN[0], list) else [IN[0]] #IsInstance
Hey Mate,
It worked beautifully, I was struggling to get month right but you got it perfectly. Thank you so much