<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Journal Files Location in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/journal-files-location/m-p/7559760#M54615</link>
    <description>&lt;P&gt;Dear Dale,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for your query.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There is always more than one way to do everything.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I always believed that Revit always places journal files in the journal subdirectory under the main Revit folder containing Revit.exe itself.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could also search your hard disk for files whose names match the standard Revit journal file naming convention, and even parse their content to verify that they really are Revit journal files, not just by name, but also by content.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, I assume that using the RecordingJournalFilename property is the only official way to go, and also the safest and most convenient.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could always store the property value somewhere in the system.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could also check and compare the property with the stored value every time Revit is started up and issue a warning and/or update your external data if it is modified.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this helps.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jeremy&lt;/P&gt;</description>
    <pubDate>Mon, 20 Nov 2017 19:38:31 GMT</pubDate>
    <dc:creator>jeremytammik</dc:creator>
    <dc:date>2017-11-20T19:38:31Z</dc:date>
    <item>
      <title>Journal Files Location</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/journal-files-location/m-p/7558312#M54614</link>
      <description>&lt;P&gt;Is this the only way to determine the location of Journal files?&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;Application&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;.RecordingJournalFilename&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;The intention is to run a cleanup tool outside of Revit, so I've checked the registry and Revit.ini but can't find any reference. Thanks. Dale&amp;nbsp;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Nov 2017 13:09:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/journal-files-location/m-p/7558312#M54614</guid>
      <dc:creator>Dale.Bartlett</dc:creator>
      <dc:date>2017-11-20T13:09:14Z</dc:date>
    </item>
    <item>
      <title>Re: Journal Files Location</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/journal-files-location/m-p/7559760#M54615</link>
      <description>&lt;P&gt;Dear Dale,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for your query.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There is always more than one way to do everything.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I always believed that Revit always places journal files in the journal subdirectory under the main Revit folder containing Revit.exe itself.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could also search your hard disk for files whose names match the standard Revit journal file naming convention, and even parse their content to verify that they really are Revit journal files, not just by name, but also by content.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, I assume that using the RecordingJournalFilename property is the only official way to go, and also the safest and most convenient.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could always store the property value somewhere in the system.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could also check and compare the property with the stored value every time Revit is started up and issue a warning and/or update your external data if it is modified.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this helps.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jeremy&lt;/P&gt;</description>
      <pubDate>Mon, 20 Nov 2017 19:38:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/journal-files-location/m-p/7559760#M54615</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2017-11-20T19:38:31Z</dc:date>
    </item>
    <item>
      <title>Re: Journal Files Location</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/journal-files-location/m-p/7560758#M54616</link>
      <description>&lt;P&gt;Hi Jeremy, Thanks again for the reply. The Journal folder is actually here now:&lt;/P&gt;
&lt;P&gt;C:\Users\&amp;lt;USER&amp;gt;\AppData\Local\Autodesk\Revit\Autodesk Revit 2017\Journals&lt;/P&gt;
&lt;P&gt;It seems the location is written into the code, as it is recreated if moved/deleted. I'll use &lt;FONT color="#2b91af" face="Consolas" size="2"&gt;Application&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;.RecordingJournalFilename&lt;/FONT&gt;.&lt;/P&gt;
&lt;P&gt;Thanks, Dale&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Nov 2017 04:46:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/journal-files-location/m-p/7560758#M54616</guid>
      <dc:creator>Dale.Bartlett</dc:creator>
      <dc:date>2017-11-21T04:46:51Z</dc:date>
    </item>
    <item>
      <title>Re: Journal Files Location</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/journal-files-location/m-p/7564766#M54617</link>
      <description>&lt;P&gt;This is what I came up with, in case someone finds it useful (or improves it):&lt;/P&gt;
&lt;PRE&gt;private void GetJournalFolders()
        {      
            string lstrPathWithEnv = @"%USERPROFILE%\AppData\Local\Autodesk\Revit";
            string lstrRootFolder = Environment.ExpandEnvironmentVariables(lstrPathWithEnv);
            string[] lstrFoldersFound = Directory.GetDirectories(lstrRootFolder, "Journals", SearchOption.AllDirectories);

            Int32 lintFileCount = 0;
            Int64 lintTotalSize = 0;
            string lstrMsg = string.Empty;

            foreach (string lstrFolder in lstrFoldersFound)
            {
                lintTotalSize = GetFolderSize(lstrFolder, out lintFileCount);
                double ldblTotalSizeMB = ((double)lintTotalSize / 1024) / 1024;

                if (lstrMsg == string.Empty)
                    lstrMsg = "Journal files found:";

                lstrMsg = lstrMsg
                        + Environment.NewLine
                        + Environment.NewLine
                        + lstrFolder
                        + Environment.NewLine
                        + "Total Files: "
                        + lintFileCount.ToString()
                        + Environment.NewLine
                        + "Total Folder Size: "
                        + ldblTotalSizeMB.ToString("0.##")
                        + " MB ("
                        + lintTotalSize.ToString("#,##0")
                        + " bytes)"
                        ;
            }
            MessageBox.Show(lstrMsg);
        }&lt;/PRE&gt;</description>
      <pubDate>Wed, 22 Nov 2017 11:05:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/journal-files-location/m-p/7564766#M54617</guid>
      <dc:creator>Dale.Bartlett</dc:creator>
      <dc:date>2017-11-22T11:05:46Z</dc:date>
    </item>
  </channel>
</rss>

