- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I want to use this hit and miss method to find out why a Revit model crashes.
AFAIK, I would have to search the journal for the keywords ExceptionCode=?????
//here is an example of the code I would use is this the best method or can I get the exception and its code more directly using the revit api...
string journalPath = doc.Application.RecordingJournalFilename;
List<string> JournalLines = new List<string>();
var fs = new FileStream(journalPath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
using (var sr = new StreamReader(fs))
{
string line;
while ((line = sr.ReadLine()) != null)
{
if (line.Contains("ExceptionCode=")
{
//record data after "ExceptionCode="
}
Also are the exception codes found in the journal file available from Autodesk on a site, otherwise i will just google each time i encounter a new error?
Solved! Go to Solution.
Developer Advocacy and Support +