Skip to content

JournalLine types

Andreas Dieckmann edited this page Jul 29, 2024 · 31 revisions

JournalAddinEvent

JournalAddinEvents contain information that is stored by addins in a Revit journal, e.g. for future journal playback.

A typical line looks like this:

Jrn.AddInEvent "AddInJournaling" , "WpfWindow(_this,Dynamo).WpfButton(0,RunButton).Click()"

(This sample line gets recorded when you press the Run button in Dynamo...)

The JournalAddinEvent.Text node extracts the relevant portion of such a line, in this example that would be:

WpfWindow(_this,Dynamo).WpfButton(0,RunButton).Click()

Use cases

  • Identify when or how often a given addin performed a given action

JournalAPIMessage

JournalAPIMessages are comments that record two types of events: errors and successes.

The JournalAPIMessage.IsError node returns either True or False and can therefore be used for filtering.

The Journal.ContainsAPIErrors node can be used for identifying journals that contain API errors.

The JournalAPIMessage.Type node classifies the message type. Here's a list of types I've seen so far:

  • AddedPushbutton
  • AssemblyVersionConflict
  • Exception
  • RegisteredExternalServer
  • RegisteredExternalService
  • RegisteringCommandEvent
  • RegisteringEvent
  • ReplacingCommandID
  • RestoringCommandID
  • StartingExternalApp
  • StartingExternalDBApp
  • UnregisteringEvent

A typical line looks like this:

' 0:< API_SUCCESS { Added pushbutton Id: 6404, name: , text: Dynamo 1.3, class: Dynamo.Applications.DynamoRevit, assembly: C:\Program Files\Dynamo\Dynamo Revit\1.3\Revit_2016\DynamoRevitDS.dll } 

The JournalAPIMessage.Text node extracts the relevant portion of such a line, in this example that would be:

Added pushbutton Id: 6404, name: , text: Dynamo 1.3, class: Dynamo.Applications.DynamoRevit, assembly: C:\Program Files\Dynamo\Dynamo Revit\1.3\Revit_2016\DynamoRevitDS.dll

(This sample line gets recorded when the Dynamo 1.3 button is added to the Revit ribbon.)

Use cases

  • Identify journals that contain API errors
  • Extract a list of loaded assemblies (i.e. DLLs)
  • Identify which addins subscribe to which Revit events

JournalBasicFileInfo

JournalBasicFileInfo are comments that provide information on the active project.

A typical line looks like this:

' [Jrn.BasicFileInfo] Rvt.Attr.Worksharing: Central Rvt.Attr.UserName:  Rvt.Attr.CentralModelPath: SOMEPATH\MODELNAME.rvt Rvt.Attr.RevitBuildVersion: Autodesk Revit 2017 (Build: 20170419_0315(x64)) Rvt.Attr.LastSavePath: SOMEPATH\MODELNAME.rvt Rvt.Attr.ProjectSpark: notProjectSpark Rvt.Attr.LocaleWhenSaved: ENU 

Most of this data is made available via the following nodes:

  • JournalBasicFileInfo.CentralModelPath, in this example with a value of SOMEPATH\MODELNAME.rvt
  • JournalBasicFileInfo.LastSavePath, in this example with a value of SOMEPATH\MODELNAME.rvt (The file name itself can be extracted by using JournalBasicFileInfo.FileName)
  • JournalBasicFileInfo.Locale, in this example with a value of ENU
  • JournalBasicFileInfo.Worksharing, in this example with a value of Central (other possible values are Local and Not enabled)

Use cases

  • Retrieve information on active model

JournalCommand

JournalCommands record any commands executed during a Revit session. These commands are used in journal playback. Note that only commands with a built-in command id (e.g. ID_VIEW_CATEGORY_VISIBILITY) are recorded here. For addin commands, have a look at JournalUIEvents instead.

A typical line looks like this:

Jrn.Command "SystemMenu" , "Quit the application; prompts to save projects , ID_APP_EXIT"

The JournalCommand.Type node extracts the first part of the line, in this example that would be SystemMenu. The type basically describes the context from where the command was entered. Here's a list of types I've seen so far:

  • AccelKey - Typically these are commands like Cancel, Delete or Undo started using your keyboard
  • Internal - I've mostly seen this for displaying Revit's startup page, but also for some other commands every now and then
  • KeyboardShortcut - Any command started using a keyboard shortcut
  • PrintPreviewUI - Any commands started from print preview
  • Ribbon - Any command started by clicking on a button in the Revit ribbon
  • StartupPage - Any command started by clicking on something on Revit's startup page
  • StatusBar - Any command started by clicking on a control in the status bar
  • SystemMenu - I've only seen this for exiting Revit so far

The JournalCommand.Description node extracts the second part of the line, in this example that would be Quit the application; prompts to save projects.

The JournalCommand.ID node extracts the third part of the line, in this example that would be ID_APP_EXIT.

Use cases

  • Identify (in)frequently used keyboard shortcuts
  • Identify frequently used commands not launched via keyboard shortcut
  • Identify commands that frequently get cancelled
  • Identify commands that are frequently followed by an Undo command
  • Identify models opened/closed

JournalComment

JournalComments are any comments that are not:

There is still a lot more data to mine from comments so feel free to create an issue on this repo with your suggestions.

JournalData

JournalData records various kinds of data that would be used in journal playback. Examples include but are not limited to:

  • Default template
  • Default view discipline
  • Task dialogs and buttons pressed
  • Journal data keys written for/by addins for journal playback
  • Successful API transactions of tools and addins

A typical line looks like this:

Jrn.Data "TaskDialogResult", "Do you want to save changes to DummyModel_R2016.rfa?", "Yes", "IDYES"

The JournalData.Key node extracts the key which is the first part of the line, in this example that would be TaskDialogResult.

The JournalData.Values node extracts the values associated with that key which is the second part of the line, in this example that would be:

[0] Do you want to save changes to DummyModel_R2016.rfa?
[1] Yes
[2] IDYES

Use cases

  • Identify opened models
  • Identify certain transactions of addins (e.g. Dynamo graph was run)

JournalDirective

JournalDirectives mostly record certain Revit settings and can be used in journal playback, too. There is a fixed number of directives that appear during startup and a whole different set of directives that get recorded during the actual Revit session. Examples of startup directives include but are not limited to:

  • Revit version
  • Username
  • Selection options (e.g. can links be selected)

A typical line looks like this:

Jrn.Directive "Version" , "2017.000", "2.153"

The JournalDirective.Key node extracts the key which is the first part of the line, in this example that would be Version.

The JournalDirective.Values node extracts the values associated with that key which is the second part of the line, in this example that would be:

[0] 2017.000
[1] 2.153

Use cases

  • Identify Revit version
  • Identify user

JournalGUIResourceUsage

JournalGUIResourceUsage are comments that track - surprise - GUI resource usage.

A typical line looks like this:

' 1:< GUI Resource Usage GDI: Avail 9813, Used 187, User: Used 171

This data is made available via the following nodes:

  • JournalGUIResourceUsage.Available, in this example with a value of 9813
  • JournalGUIResourceUsage.Used, in this example with a value of 187
  • JournalGUIResourceUsage.User, in this example with a value of 171

All nodes return integers so you can use the node output for calculations.

JournalKeyboardEvent

JournalKeyboardEvents record special keys pressed in a Revit session and are used in journal playback.

A typical line looks like this:

Jrn.Key    0 , "VK_DOWN" , 49488

The JournalKeyboardEvent.Key node extracts the key that was pressed, in this example that would be VK_DOWN aka down arrow. So far, I've seen records mostly for the following keys:

  • Arrow keys: VK_RIGHT, VK_DOWN, VK_LEFT, VK_UP
  • Carriage return (Enter): CR
  • Function keys: VK_F1, VK_F2 and so on
  • Control: VK_CONTROL
  • Shift: VK_SHIFT
  • Tab: Tab

I have no idea what the numbers mean, so I didn't include a node for retrieving them.

JournalMemoryMetrics

JournalMemoryMetrics are comments that track memory usage.

A typical line looks like this:

' 0:< ::0:: Delta VM: Avail -52 -> 134217124 MB, Used +5 -> 68 MB, Peak +5 -> 68 MB; RAM: Avail -48 -> 8680 MB, Used +13 -> 148 MB, Peak +13 -> 148 MB 

This data is made available via the following nodes:

  • JournalMemoryMetrics.RAMAvailable, in this example with a value of 8680
  • JournalMemoryMetrics.RAMPeak, in this example with a value of 148
  • JournalMemoryMetrics.RAMUsed, in this example with a value of 148
  • JournalMemoryMetrics.VMAvailable, in this example with a value of 134217124
  • JournalMemoryMetrics.VMPeak, in this example with a value of 68
  • JournalMemoryMetrics.VMUsed, in this example with a value of 68

All nodes return integers so you can use the node output for calculations.

Use cases

  • Identify Revit sessions that have run out of memory
  • Monitor memory usage across a session

JournalMiscCommand

JournalMiscCommands are any items that would be used in journal playback that are not:

If you see any JournalMiscCommands that are not part of the following list, please create an issue on this repo:

  • Dim Jrn
  • Set Jrn = CrsJournalScript

JournalMouseEvent

JournalMouseEvents record mouse actions in a Revit session and are used in journal playback.

A typical line looks like this:

Jrn.MouseMove    0 ,    552 ,    708

The JournalMouseEvent.Type node extracts the first part of the line, in this example that would be MouseMove. The type basically describes what type of action was performed with the mouse. Here's a list of types I've seen so far:

  • LButtonDblClk
  • LButtonDown
  • LButtonUp
  • MButtonDblClk
  • MButtonDown
  • MButtonUp
  • MouseMove
  • RButtonDblClk
  • RButtonDown
  • RButtonUp
  • Scroll
  • Wheel

The JournalMouseEvent.Data node extracts the data from the rest of the line, in this example that would be:

[0] 0
[1] 552
[2] 708

JournalSystemInformation

JournalSystemInformation are comments that record information about the hardware of the machine the journal was run on. JournalSystemInformation blocks start with an introductory JournalComment that describes the type of recorded information, e.g.:

' 0:< OPERATING SYSTEM INFORMATION:

These types can be retrieved using the JournalSystemInformation.Type node. These are the types I've seen so far:

  • OperatingSystem
  • Printer
  • PrinterConfiguration
  • Processor
  • VideoController

A typical line looks like this:

' 0:<    MaxClockSpeed : 2801

Certain types (Printer, PrinterConfiguration & VideoController) may contain information about multiple devices. Devices are numbered consecutively (starting with the processor) - the device number is exposed via the JournalSystemInformation.Item node.

The key-value pairs are exposed via the JournalSystemInformation.Key (in this example: MaxClockSpeed) and JournalSystemInformation.Value (in this example: 2801) nodes respectively.

Use cases

  • Compare system information of different machines (e.g. Windows build, CPU speed etc.)

JournalTimeStamp

JournalTimeStamps are comments that mark the current time. I am using them to divide the journal into smaller parts which I call blocks. Every JournalTimeStamp marks the beginning of a new block.

A typical line looks like this:

'C 24-Oct-2017 11:45:22.013;   0:< finished recording journal file

(This sample line gets recorded as the last line of the journal in a regular Revit session, i.e. no abnormal termination of Revit.)

The first letter of any JournalTimeStamp is its type which can be retrieved with the JournalTimeStamp.Type node. I've seen three different types: C, E and H. Unfortunately, I have no idea what those letters stand for.

The timestamp itself can be retrieved with the JournalTimeStamp.DateTime node. Use Dynamo's OOTB node TimeSpan.ByDateDifference to calculate the delta between two timestamps or just subtract one from the other in a Python node.

Some JournalTimeStamps also contain a message which can be retrieved with the JournalTimeStamp.Description node. So far, I've only seen this for type C. In the above example the node would return finished recording journal file.

Use cases

  • Measure time between certain events (e.g. opening and closing a model)

JournalUIEvent

JournalUIEvents record any interactions with the Revit user interface and are used in journal playback.

A typical line looks like this:

Jrn.RibbonEvent "Execute external command:CustomCtrl_%CustomCtrl_%Add-Ins%Visual Programming%Dynamo 1.3:Dynamo.Applications.DynamoRevit"

The JournalUIEvent.Type node extracts the first part of the line, in this example that would be RibbonEvent. The type basically describes the context from where the command was entered. Here's a list of types I've seen so far:

  • Activate - Making a view the active view?
  • AppButtonEvent - Closing or opening the Revit menu
  • Browser - Interactions with the project browser
  • CheckBox - Interactions with check boxes in dialogs
  • Close - Closing a view
  • ComboBox - Interactions with combo boxes in dialogs
  • DropFiles - Files loaded via drag and drop
  • Edit - Interactions with text fields in dialogs
  • Grid - Interactions with table-like dialogs (e.g. compound structures etc.)
  • ListBox - Interactions with drop-down lists in dialogs
  • Maximize - Maximizing a view
  • Minimize - Minimizing a view
  • PropertiesPalette - Activating or leaving the properties palette
  • PushButton - Interactions with buttons in dialogs
  • RadioButton - Interactions with buttons in dialogs
  • Restore - Restoring a minimized view
  • RibbonEvent - Interactions with elements in the ribbon
  • Size - Report on size of active window
  • SBTrayAction - Starting the filter from the status bar
  • SliderCtrl - Interactions with buttons in dialogs
  • TabCtrl - Interactions with tabs in dialogs
  • TreeCtrl - Interactions with tree view elements in dialogs
  • WidgetEvent - Interactions with elements in the material editor

The JournalUIEvent.Data node extracts all of the data from the second part of the line, in this example that would be:

[0] Execute external command
[1] CustomCtrl_%CustomCtrl_%Add-Ins%Visual Programming%Dynamo 1.3
[2] Dynamo.Applications.DynamoRevit

Use cases

  • Identify when an addin was started
  • Identify when a document was closed
  • Identify various interactions with dialogs

JournalWorksharingEvent

JournalWorksharingEvents are comments that record the same worksharing-related events that are also recorded in the *.slog file of a central model's backup directory.

A typical line looks like this:

' 7:< SLOG $931175d6 2017-11-07 08:38:14.274 >Session  $931175d6

(This sample line gets recorded when a new worksharing session starts.)

The JournalWorksharingEvent.SessionID node extracts the event's session ID, in this example that would be $931175d6.

The JournalWorksharingEvent.DateTime node extracts the event's timestam, in this example that would be 2017-11-07 08:38:14.274.

The JournalWorksharingEvent.Text node extracts the event's text message, in this example that would be >Session $931175d6 (meaning "starting new session with the ID '$931175d6'").

Use cases

  • Cross-reference between journal files and worksharing logs by means of session ID