Exemplo n.º 1
0
def ExportSessionFilesData(sessionDataFolderPath, sessionId, sessionFiles):
    sessionFilesData = GetSessionFilesData(sessionId, sessionFiles)
    serializedSessionFilesData = json_util.SerializeObject(
        sessionFilesData, True)
    sessionFilesDataFilePath = Path.Combine(sessionDataFolderPath,
                                            SESSION_FILES_DATA_FILENAME)
    text_file_util.WriteToTextFile(sessionFilesDataFilePath,
                                   serializedSessionFilesData)
    return sessionFilesData
Exemplo n.º 2
0
def ExportSnapshotDataInternal(snapshotDataFilePath, sessionId,
                               revitProjectFilePath, snapshotStartTime,
                               snapshotEndTime, dataExportFolderPath,
                               revitJournalFilePath, snapshotError):
    snapshotData = GetSnapshotData(sessionId, revitProjectFilePath,
                                   snapshotStartTime, snapshotEndTime,
                                   dataExportFolderPath, revitJournalFilePath,
                                   snapshotError)
    serializedSnapshotData = json_util.SerializeObject(snapshotData, True)
    text_file_util.WriteToTextFile(snapshotDataFilePath,
                                   serializedSnapshotData)
    return snapshotData
 def SaveTestModeData(self, testModeData):
     testModeData = json_util.SerializeObject(testModeData,
                                              prettyPrint=True)
     testModeDataFilePath = self.GetTestModeDataFilePath()
     File.WriteAllText(testModeDataFilePath, testModeData)
     return