Journal File Magic & Exporting Groups to File (part 2)

The first thing to do, is take the cleaned journal file created in the previous post and see if it will run in Revit. So drag the .txt file onto the Revit shortcut on your desktop and see what happens.

Hmmm. That’s not great. So open up the newly created journal file and search for “journal file playback”

“Data missing from file follows” means that when the journal was being replayed, something happened that was not found in the journal file. In this case, it is the task dialog informing us that there is an existing file and asking if it should be replaced.

Which is correct, that didn’t occur when I first recorded the journal file and now it does occur because that file does exist. This is an important lesson about the brittleness of journal file replay. If something happens (or doesn’t happen) that doesn’t match up with what the journal file says should happen, then the journal replay will stop. With the API, we can much more flexibly handle situations like this, but not with journal replay.

So delete the existing group RVT file and try the replay again. This time it works! Revit launches, opens the RVT, saves the group RVT, and the Revit session exits.

The next thing to do is figure out what we are going to modify in the journal to select different groups to save. Because while in the UI there is a “Group to Save” dropdown list that lists the groups by name, the journal file does not name the group in the same way, it instead has a numeric index that represents the group to save.

The next important thing to know is that Revit will run VBScript as part of journal file replay! So read a good article about looping structures in VBScript (like https://www.w3schools.com/asp/asp_looping.asp) and come back for the next post in the series to see what to do next.

One thought on “Journal File Magic & Exporting Groups to File (part 2)

Leave a comment