Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Journal File format

  1. #1
    AUGI Addict
    Join Date
    2001-12
    Posts
    1,714
    Login to Give a bone
    0

    Default Journal File format

    In an effort to get some Journal File documentation, I am starting this thread for comment.

    Please limit first level replies to some line or section from the Journal file with notes and comments on how it works. Hopefully each post can be a single line or idea. Then replies to those can be questions, embellishments, etc. Once we have compiled something relatively complete, I will compile things and find out how to post to the Revit - FAQ forum.

    Thanks all!
    Gordon

  2. #2
    AUGI Addict
    Join Date
    2001-12
    Posts
    1,714
    Login to Give a bone
    0

    Default Re: Journal File format

    ' Build: 20070607_1700

    Identifies the Build number of Revit and is always the second line of the Journal file. Useful to verify build numbers when comparing Journals for multiple members of a team, to be sure everyone is/was on the same build. Sometimes in tracing a problem you discover that someone on an older build got thrown on to a project on the newer build, and no one told the BIM Manager!

    Also, any time you open or create a new Revit file, you will also see
    'Revit Build: 20070607_1700

    Obviously the build number can't change while Revit open, and a new Journal is created each time you launch Revit, so I am unsure what the redundancy is about.

    Gordon

  3. #3
    NavisWorks Moderator david.kingham's Avatar
    Join Date
    2004-07
    Location
    Fort Collins, CO
    Posts
    1,329
    Login to Give a bone
    0

    Default Re: Journal File format

    I haven't tested all of these, but it's something to start with

    Open a file
    Jrn.Command "Internal" , "Open an existing project , 57601 , ID_REVIT_FILE_OPEN"
    Jrn.Data "File Name" , "IDOK", file_name

    Save As
    Jrn.Command "Menu" , "Save the active project with a new name , 57604 , ID_FILE_SAVE_AS"
    Jrn.Data "File Name" , "IDOK", file_name

    Save As with Suffix
    Jrn.Command "Menu" , "Save the active project with a new name , 57604 , ID_FILE_SAVE_AS"
    Jrn.Data "File Name" , "IDOK", file_name & "-suffix.rvt"

    Exit Revit
    Jrn.Command "Quit the application; prompts to save projects , 57665 , ID_APP_EXIT"

    Close Project
    Jrn.Command "Close the active project , 57602 , ID_FILE_CLOSE"

    Regen All
    Jrn.Command "Menu" , "Regenerate everything , 33282 , ID_REGEN_ALL"

    Tile Vertically
    Jrn.Command "Menu" , "Arrange windows as non-overlapping tiles , 57652 , ID_WINDOW_TILE_VERT"

    Zoom to Fit
    Jrn.Command "ToolMenu: 32780 , ID_ZOOM_IN" , "Redraw everything as large as fits into window , 32782 , ID_ZOOM_FIT"

    Load family into project
    'Jrn.Command "Menu" , "Load a family into the project , 32984 , ID_FAMILY_LOAD"

    Create a new project
    'Jrn.Command "Menu" , "Create a new project , 33179 , ID_FILE_NEW_CHOOSE_TEMPLATE"

    Visibility Graphics
    Jrn.Command "Internal" , "Control visibility and appearance of objects (applied only in the active view) , 33175 , ID_VIEW_CATEGORY_VISIBILITY"

    Export Schedule
    Jrn.Command "Menu" , "Export a schedule , 33710 , ID_FILE_EXPORT_SCHEDULE"

    Create Text
    Jrn.Command "Menu" , "Create a text object , 33134 , ID_OBJECTS_TEXT_NOTE"

    Open with select worksets dialog
    '
    Set Jrn = CrsJournalScript
    Jrn.Command "Menu" , "Open an existing project , 57601 , ID_REVIT_FILE_OPEN"
    Jrn.Data "File Name" _
    , "IDOK", "..\..\..\Revit Local Files\filename.rvt"
    Jrn.Data "WorksetConfig" _
    , "Custom", 1
    Last edited by david.kingham; 2007-08-29 at 10:46 PM.

  4. #4
    100 Club Steve Mintz's Avatar
    Join Date
    2006-03
    Location
    San Diego, CA
    Posts
    169
    Login to Give a bone
    0

    Default Re: Journal File format

    Purge Unused Worksets
    Jrn.Command "Menu" , "Delete worksets permanently , 35206 , ID_PURGE_DELETED_WORKSETS"

    A hidden command which deletes unused worksets, which may number in the thousands on a project. This can improve model response time, but should be done with care.

    Close hidden windows
    Jrn.Command "Menu" , "Close all windows that are hidden , 33712 , ID_WINDOW_CLOSE_HIDDEN"

    Load families by dropping into an open view
    Jrn.DropFiles "[" + FileSystemObject.GetFileName(FileName) + "]" , "Drafting View: 0 How To"
    Jrn.Data "Dropped File Name" , FileName

    The first parameter is [File Name] the second parameter is the View Name



    A few more notes I've learned on script files:
    1. The first line must be a comment
    2. Script files are written in the language vbscript. I have included some of the commands it uses below out of one of my script files.

    Catch errors and allow script to continue so that Revit does not freeze
    On Error Resume Next

    Define a Variable
    Dim FileName

    Open a text file for reading
    Set FileSystemObject = CreateObject("Scripting.FileSystemObject")
    Set FileStream = FileSystemObject.OpenTextFile(FileListFile, 1)

    Open a Revit file using the information from the text file
    If FileStream.AtEndofStream <> True Then
    FileName = FileStream.Readline
    Jrn.Command "Menu" , "Open an existing project , 57601 , ID_FILE_OPEN"
    Jrn.Data "File Name" , "IDOK", FileName
    End If

    Loop and drop files
    Do While FileStream.AtEndofStream <> True
    FileName = FileStream.ReadLine
    Jrn.Data "Dropped File Name" , FileName
    Loop


    Hope this helps!!

  5. #5
    Count (Formula) dbaldacchino's Avatar
    Join Date
    2005-07
    Location
    Missouri City, Texas (Houston area)
    Posts
    3,250
    Login to Give a bone
    0

    Default Re: Journal File format

    Great thread My apologies for not contributing a piece of script, but I'd like to ask if anyone has been successful running a journal in an already running session of Revit. Somehow this is possible through the API (you can record and run journals using Shortcut Highway, so somehow, this is possible). I'm trying to figure a way to trigger Revit to run a journal while it's open and a project is loaded. This would open up a lot of possibilities.

  6. #6
    I could stop if I wanted to Kevin Janik's Avatar
    Join Date
    2003-05
    Location
    Portland, OR
    Posts
    383
    Login to Give a bone
    0

    Default Re: Journal File format

    Is it possible to run the command you want through the Shortcut Highway and then read what it did in the journal file to obtain what you need to run journal files out of Revit, like what is below that crashed Revit?

    Kevin


    Jrn.MouseMove 0 , 1137 , 6
    ' E 31-Aug-2007 14:49:35.531; 0:<
    Jrn.Command "Internal" , "Play back a previously recorded journal file , 33037 , ID_JOURNAL_PLAYBACK"
    ' 0:< 31-Aug-2007 14:49:41.609; started journal file playback of "C:\Program Files\Revit Architecture 2008\Journals\dump.0003.txt"
    ' 0:< 31-Aug-2007 14:49:41.671; Scripting failure Object required: 'Jrn'
    'Src: Microsoft VBScript runtime error
    'Line:2 Error:0 Scode:800a01a8
    ' 0:< 31-Aug-2007 14:49:41.718; Exception occurred
    ' 0:< 31-Aug-2007 14:49:41.718; ExceptionCode=0xc0000005 ExceptionFlags=0x00000000 ExceptionAddress=00D8C3BC
    ' 0:< System (KB) [Available / Total ] [Revit Memory Usage (KB) ---------------- ]
    ' 0:< RAM Statistics: 1295300 / 2095532 16552=InUse 210684=Peak 783680=Delta
    ' 0:< VM Statistics: 1700348 / 2097024 161956=InUse 167732=Peak 234720=Delta
    ' 0:< funcUnhandledExceptionFilter is executed in a non-main thread thread, terminating now...

    Here is the bottom of one that did run to the end. Line 18 below is where it ended. The rest is just some context.


    Jrn.MouseMove 0 , 173 , 244
    ' 0.000081 1:<<<;PERF;MISC;generating greps
    ' 0.000033 1:<<<;PERF;MISC;tweaking
    ' 0.141689 1:<<<;PERF;MISC;regenerating
    ' 0.001530 1:<<<;PERF;MISC;regenerating
    ' 0.000495 1:<<<;PERF;MISC;generating greps
    ' 0.000097 1:<<<;PERF;MISC;tweaking
    ' E 31-Aug-2007 14:57:07.671; 0:<
    Jrn.Command "DesignBar" , "Select objects to modify , 32776 , ID_BUTTON_SELECT"
    ' 0.000082 1:<<<;PERF;MISC;generating greps
    ' 0.000033 1:<<<;PERF;MISC;tweaking
    ' 0.000284 1:<<EndOrAbortUndoTransaction();DOPT;
    ' 0.000039 2:<<<EndOrAbortUndoTransaction() -- structural regen;DOPT;
    ' 0.000245!!! 2:<<<ALL_GAPS/ 0.000284 EndOrAbortUndoTransaction();DOPT;
    ' 0.033599 1:<<<;PERF;MISC;drawing
    ' E 31-Aug-2007 14:57:07.765; 0:<
    Jrn.MouseMove 0 , 991 , 61
    ' 0:< 31-Aug-2007 14:57:07.781; finished journal file playback
    ' H 31-Aug-2007 14:57:07.781; 0:<
    Jrn.Directive "ScreenResolution" _
    , 240, 1200
    ' H 31-Aug-2007 14:57:07.781; 0:<
    Jrn.Directive "GlobalToProj" _
    , "[Project2]", "Floor Plan: Level 1" _
    , 0.01041666666667 _
    , 1.00000000000000, 0.00000000000000, 0.00000000000000 _
    , 0.00000000000000, 1.00000000000000, 0.00000000000000 _
    , 0.00000000000000, 0.00000000000000, 1.00000000000000 _
    , 0.00000000000000, 0.00000000000000, 0.00000000000000
    ' H 31-Aug-2007 14:57:07.781; 0:<
    Jrn.Directive "ProjToPage" _
    , "[Project2]", "Floor Plan: Level 1" _
    , 455.64604280984474 _
    , 455.64604280984474, 0.00000000000000, 0.00000000000000 _
    , 0.00000000000000, 455.64604280984474, 0.00000000000000 _
    , 0.00000000000000, 0.00000000000000, 455.64604280984474 _
    , 649.06455207547219, -500.90725303171649, 0.00000000000000
    ' H 31-Aug-2007 14:57:07.781; 0:<
    Jrn.Directive "WindowSize" _
    , "[Project2]", "Floor Plan: Level 1" _
    , 1317, 989
    ' H 31-Aug-2007 14:57:07.781; 0:<
    Jrn.Directive "WindowSize" _
    , "[Project1]", "Floor Plan: Level 1" _
    , 1219, 632
    ' E 31-Aug-2007 14:57:10.984; 0:<
    Jrn.MouseMove 0 , 164 , 477
    ' E 31-Aug-2007 14:57:10.984; 0:<
    Jrn.LButtonDown 1 , 164 , 477
    ' 0:< Candidates (curIdx = -1):
    ' E 31-Aug-2007 14:57:11.046; 0:<
    Last edited by Kevin Janik; 2007-08-31 at 10:03 PM.

  7. #7
    Count (Formula) dbaldacchino's Avatar
    Join Date
    2005-07
    Location
    Missouri City, Texas (Houston area)
    Posts
    3,250
    Login to Give a bone
    0

    Default Re: Journal File format

    Well, how would that help? If I find something in a journal that tells me how to do something, am I not still stuck with being unable to run a journal in the current open session of Revit? Sounds like the chicken and the egg dilemma

  8. #8
    I could stop if I wanted to Kevin Janik's Avatar
    Join Date
    2003-05
    Location
    Portland, OR
    Posts
    383
    Login to Give a bone
    0

    Default Re: Journal File format

    Can the API call a Revit command like LISP can call an AutoCAD command?

    The attached sample API function text files from the Revit 2008 SDK shows how a program using the API can write to the Journal file and then read the file to create.

    Kevin
    Attached Files Attached Files
    Last edited by Kevin Janik; 2007-08-31 at 11:47 PM.

  9. #9
    I could stop if I wanted to Kevin Janik's Avatar
    Join Date
    2003-05
    Location
    Portland, OR
    Posts
    383
    Login to Give a bone
    0

    Default Re: Journal File format

    Has anyone taken a look at this?

  10. #10
    All AUGI, all the time clog boy's Avatar
    Join Date
    2006-12
    Location
    Probably near a PC.
    Posts
    843
    Login to Give a bone
    0

    Default Re: Journal File format

    Does Revit have something like a DOM?

Page 1 of 2 12 LastLast

Similar Threads

  1. Journal File uses
    By Rick Houle in forum Revit Architecture - General
    Replies: 3
    Last Post: 2008-02-20, 02:55 PM
  2. how to halt a journal file?
    By Joef in forum Revit Architecture - General
    Replies: 4
    Last Post: 2007-08-16, 02:18 AM
  3. journal file
    By Cheuk Ling in forum Revit Architecture - General
    Replies: 5
    Last Post: 2007-07-11, 01:55 PM
  4. Journal File Size
    By William Troeak in forum Revit Architecture - General
    Replies: 1
    Last Post: 2007-06-11, 07:48 PM
  5. How can I run a Journal file?
    By rgranja508683 in forum Revit Architecture - General
    Replies: 2
    Last Post: 2004-04-15, 08:30 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •