andydandy74 / Journalysis

Revit journal and worksharing log analysis package for the Dynamo visual programming environment
MIT License
47 stars 6 forks source link

Better use for timestamps #24

Closed andydandy74 closed 5 years ago

andydandy74 commented 6 years ago

Need a method to get all journal lines in a certain time window:

andydandy74 commented 6 years ago
def GetLinesByDateTime(self, fromDateTime, toDateTime):
    if fromDateTime and toDateTime: tslist = [x for x in self.GetLinesByType("JournalTimeStamp") if x.DateTime > fromDateTime and x.DateTime < toDateTime]
    elif fromDateTime: tslist = [x for x in self.GetLinesByType("JournalTimeStamp") if x.DateTime > fromDateTime]
    elif toDateTime: tslist = [x for x in self.GetLinesByType("JournalTimeStamp") if x.DateTime < toDateTime]
    else tslist = []
    return self.GetLinesByBlocks([x.Block for x in tslist])