38
Page | 1 BLD125158 Code Blue, Dr. Revit!How to Resuscitate Corrupt Revit Models Nauman Mysorewala - @BIMologist GBBN Architects, Inc Cincinnati, OH USA Matt Wunch - @MattWunch AI Engineers, Inc, Middletown, CT USA Description Is your Revit model corrupt or causing crashes? Is the team unable to work and is losing productivity? Increase your team’s efficiency by gaining expertise for diagnosing the root cause of the issue—whether it’s the model, the user, or the computer—and resolve the issue fast. This involves understanding various error messages, recognizing several types of data corruption and their sources, repairing or recovering corrupt Revit models, and learning best practices to minimize file corruption. We’ll go over analyzing the computer when Revit crashes or the model gets corrupted. You’ll gain a better understanding of the Revit backup procedures, as well as how to locate and restore the most current backup model. We’ll arm you with the knowledge and the tools required to analyze and identify issues using the journal files and slog files. Finally, we’ll review best practices for reducing the incidence of model corruption. Updated: 1/18/2018 Learning Objectives Learn how to triage a corrupt Revit model Learn how to parse the journal and slog files for diagnosis Learn how to resuscitate a corrupt Revit model Learn best practices to minimize file corruption

BLD125158 Code Blue, Dr. Revit! How to Resuscitate Corrupt ... · • The Revit journals folder (for each version of Revit you have installed) is not an obvious location to check

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: BLD125158 Code Blue, Dr. Revit! How to Resuscitate Corrupt ... · • The Revit journals folder (for each version of Revit you have installed) is not an obvious location to check

Page | 1

BLD125158

Code Blue, Dr. Revit!—How to Resuscitate Corrupt Revit Models

Nauman Mysorewala - @BIMologist GBBN Architects, Inc Cincinnati, OH USA

Matt Wunch - @MattWunch AI Engineers, Inc, Middletown, CT USA

Description

Is your Revit model corrupt or causing crashes? Is the team unable to work and is losing productivity? Increase your team’s efficiency by gaining expertise for diagnosing the root cause of the issue—whether it’s the model, the user, or the computer—and resolve the issue fast. This involves understanding various error messages, recognizing several types of data corruption and their sources, repairing or recovering corrupt Revit models, and learning best practices to minimize file corruption. We’ll go over analyzing the computer when Revit crashes or the model gets corrupted. You’ll gain a better understanding of the Revit backup procedures, as well as how to locate and restore the most current backup model. We’ll arm you with the knowledge and the tools required to analyze and identify issues using the journal files and slog files. Finally, we’ll review best practices for reducing the incidence of model corruption. Updated: 1/18/2018

Learning Objectives

• Learn how to triage a corrupt Revit model

• Learn how to parse the journal and slog files for diagnosis

• Learn how to resuscitate a corrupt Revit model

• Learn best practices to minimize file corruption

Page 2: BLD125158 Code Blue, Dr. Revit! How to Resuscitate Corrupt ... · • The Revit journals folder (for each version of Revit you have installed) is not an obvious location to check

Page | 2

Speaker(s)

Nauman Mysorewala, BIMologist, an Autodesk Expert Elite, has more than 25 years of experience with the Autodesk® family of products including AutoCAD®, AutoCAD Architecture®, Revit® Architecture, & Navisworks® . He is a Registered Architect, Revit Architecture Certified Professional, AutoCAD Certified Professional, and LEED® AP. Nauman has presented at AU and numerous Autodesk Build your IQ webinars for AutoCAD and Revit in collaboration with Autodesk. Nauman is a BIM Manager for GBBN Architects Inc., a multi-national architectural design firm focused on innovating the essential building blocks of our communities - housing, healthcare, education, and cultural venues. He is also an Adjunct Faculty at University of Cincinnati. He has tremendous experience troubleshooting complex architectural, computer, connectivity and software issues. He is also an Approved Provider for the Autodesk Services Marketplace. He enjoys discovering new products and technologies and implementing them in architecture and construction.

Matt Wunch received his Associates in Science in Civil Engineering from Springfield Technical Community College and is currently the Technologist / BIM Manager for AI Engineers, Inc. a multi-discipline engineering firm located in Middletown, Connecticut with satellite offices in New York, Rhode Island, Massachusetts, and Virginia. He provides BIM implementation, training, and technical support for the firm’s engineering design software including Autodesk Revit, AutoCAD Civil 3D, InfraWorks, Navisworks and more. Matt has more than 25 years of experience with Autodesk software usage, installation and customization. He also supports the design team and their use of Leica scanners – P40 and BLK360 – for the collection and conversion of point cloud data for use in InfraWorks, Civil 3D and Revit. In addition, Matt is a member of the Autodesk Expert Elite program, a member of the Planning Committee of the Construction Institute's BIM Council, certified in Autodesk Building Performance Analysis, and is a Certified Professional in all versions of Revit – Architecture, Structure, MEP Mechanical and MEP Electrical, and has recently earned his sUAS (Small Unmanned Aerial Systems) license to fly drones.

Page 3: BLD125158 Code Blue, Dr. Revit! How to Resuscitate Corrupt ... · • The Revit journals folder (for each version of Revit you have installed) is not an obvious location to check

Page | 3

In medical speak "Code Blue" is generally used to indicate a patient requiring resuscitation or in need of immediate medical attention. In Revit world, our patient is the RVT project file needing recovery from excessive crashing, corrupt or worst, completely flat lining and not opening at all. As good doctors would do, DO NOT PANIC!! Here are some steps, we, as good Revit doctors, can do:

• Triage the model and check for vital signs: Figure out what the problem is or what could be causing the ailment

• Resuscitate the model: The actions you can take to fix the problem

• Be proactive: Diet and exercise can go a long way to prevent future ailments.

Signs of Trauma Signs of trauma can appear in many ways. It could be something as obvious as a warning message or fatal error or something as inconspicuous as a family that can’t be edited. Recognizing when something isn’t right is your first clue. If things just don’t feel right, it may be worthwhile to stop for a bit and check the pulse of your model before it flatlines on you.

Obvious signs of trauma

Page 4: BLD125158 Code Blue, Dr. Revit! How to Resuscitate Corrupt ... · • The Revit journals folder (for each version of Revit you have installed) is not an obvious location to check

Page | 4

Other signs of trauma

• Inability to Sync or Crash when syncing

• Crash on saving file

• Crash on editing an object

• Failure to open or crash when opening a view

• Crash when purging

• Crash when auditing

• Can’t print

• Visibility Graphics won’t open

Steps:

• Assess the basics

• Audit (if you can)

• Purge (if you can)

• Read Journals and

• Contact Autodesk Support

Assess the Basics Before performing any operation on the actual model, it is advisable to check the Vital Signs of the model and the overall system, one should always check the basics first. Such as…

Model Vitals • Can you open the model?

• Can you open the model with ‘audit’ toggled on?

• Can you open the model closing all worksets using the specify option?

• Can you open the Local model from a user and recreate a central?

• Can you open the model isolating it from network?

• Can you rename the model and open it?

System Vitals • Do I have the most recent updates for Revit installed?

• Do I have the latest video card driver installed?

• Were there any recent Windows updates?

• Do I have enough free space on my computer?

• Is the issue isolated to a user/computer/model?

• Have I checked the Autodesk Knowledge Network and online forums?

Page 5: BLD125158 Code Blue, Dr. Revit! How to Resuscitate Corrupt ... · • The Revit journals folder (for each version of Revit you have installed) is not an obvious location to check

Page | 5

Submit the Customer Error Report (CER) In cases where Revit crashes and you the user is presented with the Customer Error Report submission dialog, it is highly advisable to submit the Error Report along with a brief description of what led to the crash. If an email address is provided, Autodesk will send an email right away or sometimes in the future if an update is needed or fixes the issue that caused the crash. If you refer to release notes for a specific Revit version, i.e. 2017 http://bit.ly/2ygIptO Autodesk keeps track of the errors reported both via the CER and posts from the Revit forums and tries to proactively fix them and notify the customers.

Check the Revit Build version installed?

• Build Version can be found under Help>About, in Journal file, or SLOG file.

• Visit http://autode.sk/2fZS8Nt to check latest released Revit updates and identify Build numbers & Build Version. You can search this http://autode.sk/2gcrl0E page for a complete list of updates for various versions of Revit and if needed, you can download the available updates from your Autodesk Account Management page, or Autodesk Desktop App. https://manage.autodesk.com/cep/#products-services/updates

• Verify the local computer has the latest build.

• Verify all team members are on the same build.

• If updating to the latest Build, make sure to apply the same update to all team members editing the file.

Do I have the latest (certified) video card driver installed?

• If Revit is crashing intermittently, it is good practice to check for video card driver updates. Autodesk has a page dedicated to certified hardware but it’s important to note that it’s not completely up to date and just because a video card isn’t listed, that doesn’t mean it won’t work. Should you decide to update an old driver and for some reason it makes things worse in Revit, you can always roll back to a previous driver. Visit http://autode.sk/2ixu88T to check the latest Certified driver available for your video card.

Were there any recent Windows updates?

• A lot of random issues lately have been attributed to Windows updates and the 4.7 version of the .NET Framework. This is especially more prevalent in the older versions of Revit because they simply don’t support the newer advances in Windows technology.

• In case of major windows updates, i.e. Fall Creators, check hardware driver updates from manufacturers, including video card drivers. Windows 10 tends to update hardware

Page 6: BLD125158 Code Blue, Dr. Revit! How to Resuscitate Corrupt ... · • The Revit journals folder (for each version of Revit you have installed) is not an obvious location to check

Page | 6

drivers and they can cause issues as well. In that case a roll back may be necessary.

Do I have enough hard drive space available?

• This one isn’t as obvious as the other but it’s just as important. Without adequate disk space, Revit won’t be able to save backup and temporary files. These days with computers being upgraded with smaller SSDs (128GB or 256GB) it is critical to monitor the space usage and cleaning periodically is highly recommended.

• Whether the computer has enough hard drive space or not, it’s important to clear the %TEMP% folder. If you can’t delete everything, that’s okay. Crashed Revit sessions will leave large temporary files.

• The Revit journals folder (for each version of Revit you have installed) is not an obvious location to check for temporary bloat. When saving a non-workshared model to a network drive, Revit will save a copy of the model to the journal folder and if for some reason Revit crashes, the copy of that model will be left behind. This folder also contains backups of the families edited in a particular session.

• Refer to these tenforums.com articles (most topics are applicable to older versions) o How to Free Up Drive Space http://bit.ly/2ydTSKo o Run Disk Cleanup http://bit.ly/2ycAttl It will also find extraneous window update

files including %TEMP% files.

Is the issue isolated to a user / computer / model? Below is a list of troubleshooting questions to ask about the model…

• Are you able to open other models without any issues?

• Can other users open the same model without any issues on their machines?

• Can another user log onto your machine and open the model?

• Is this happening only for remote users at another location?

Have I checked the Autodesk Knowledge Network (AKN) and online forums Lastly, check the forums. Most likely, you’re not the only one who’s had this particular issue.

• Autodesk Knowledge Network http://autode.sk/2zpYw9H . The AKN search has improved and includes forum results.

• Autodesk Revit forums http://autode.sk/2zp6UGo. If you cannot find the particular issue, post the issue. Autodesk has invested in staffing the forums with Autodesk Expert Elites and Autodesk employees who can help. As mentioned before, Autodesk tracks the errors reported on the forums tries to proactively fix them.

• Revit community has a sticky topic where all new AKN articles related to Revit are listed. http://autode.sk/2iG0PNG

• https://www.revitforum.org/ is another source to search for the problems and post items for discussions. However, the Autodesk forums are monitored by Autodesk Technical support employees.

• Of course, there is always Google, Bing, etc.

Page 7: BLD125158 Code Blue, Dr. Revit! How to Resuscitate Corrupt ... · • The Revit journals folder (for each version of Revit you have installed) is not an obvious location to check

Page | 7

Resuscitating Revit

Before diving into fixing the model, at times Revit application may need fixing it self. This may be true in case the Revit application is crashing. We have talked about the basics of checking for Revit updates, Windows updates, Video card drivers, and other system related checks and fixes. Let's look at fixing Revit application itself

Turn off Hardware Acceleration Sometimes when encountering graphic artifacts or Revit crashing when interacting with the view, such as zoom, pan, orbit, try turning off the Hardware Acceleration. Refer to the Autodesk Knowledge Network article http://autode.sk/2zptGxJ to toggle the acceleration setting.

Reset Revit application settings It may be that Revit application needs to be reset back to its default settings. Follow the steps below to reset Revit.

o Navigate to and rename the following directories:

OLD NAME: C:\Users\<username>\AppData\Local\Autodesk\Revit\Autodesk Revit 201x NEW NAME: C:\Users\<username>\AppData\Local\Autodesk\Revit\Autodesk Revit 201x_backup

Current User Settings

OLD NAME: C:\Users\<username>\AppData\Roaming\Autodesk\Revit\Autodesk Revit 201x NEW NAME: C:\Users\<username>\AppData\Roaming\Autodesk\Revit\Autodesk Revit 201x_backup

o Open the registry editor (Start >Type REGEDIT hit enter) Rename the following registry key:

OLD NAME: HKEY_CURRENT_USER\SOFTWARE\Autodesk\Revit\<Product Name>*\Workspace NEW NAME: HKEY_CURRENT_USER\SOFTWARE\Autodesk\Revit\<Product Name>*\Workspace_backup

* Replace <Product Name> with the Revit version, such as "Revit 2018" Once those are renamed, restart Revit again. If user had any customized Keyboard shortcuts, close Revit and copy the keyboardshortcuts.xml file from the C:\Users\<username>\AppData\Roaming\Autodesk\Revit\Autodesk Revit 201x_backup to the C:\Users\<username>\AppData\Roaming\Autodesk\Revit\Autodesk Revit 201x folder and overwriting the file that was recreated during the reset.

Repair Revit Installation

• Before following this procedure make sure to back up the Current User settings mentioned in the last topic as this will reset the Keyboard Shortcuts customizations.

• In windows launch the Programs and Features control panel

• Highlight the Revit version and click on Uninstall/Change.

Page 8: BLD125158 Code Blue, Dr. Revit! How to Resuscitate Corrupt ... · • The Revit journals folder (for each version of Revit you have installed) is not an obvious location to check

Page | 8

• Select Repair or Reinstall in the installer window.

• Select Reinstall

• Verify if this fixes the Revit crashing issue

TIP: another way to check what is the current Revit version is to look in the Program and Features Version column. Visit http://autode.sk/2fZS8Nt to figure out the Version listed in the Control Panel relates to the Revit update number.

Uninstalling and Reinstalling As much as this being others and our least favorite thing to do, completely uninstall and reinstall Revit. Before embarking on this task, make sure to perform the Reset Revit applications settings procedure to backup your custom keyboard shortcuts. The process is the same as Repair Revit installation, instead of clicking Repair, click Uninstall. This http://autode.sk/2AAI2vx Autodesk AKN article goes over some additional methods of uninstalling in case simple methods fail. The only thing it does not mention is where to find the Autodesk Uninstall Tool in case it is not in the Start Menu as mentioned in the article. This is a great tool if one needs to uninstall Autodesk suites, or multiple software. It is located at:

C:\Program Files (x86)\Common Files\Autodesk Shared\Uninstall Tool/R1/UninstallTool.exe

Launching Revit without Add-ins As Revit API evolves, the access given to 3rd Party add-ins and scripting language is increasing. However rare, these sometimes can cause issues with the model or Revit application stability. Refer to this AKN article http://autode.sk/2zqchoV for the procedure of disabling add-ins in-lieu of uninstalling them. There is an open-source tool available developed by Stantec team that makes it easy to Enable / Disable Add-ins. http://bit.ly/2zxUMTx

Page 9: BLD125158 Code Blue, Dr. Revit! How to Resuscitate Corrupt ... · • The Revit journals folder (for each version of Revit you have installed) is not an obvious location to check

Page | 9

Resuscitating a corrupt Revit model

There are many variables that can cause the Revit model to become corrupt. We talked about the symptoms:

• Crash on Sync

• Inability to Sync

• Crash on Saving File

• Crash on editing an object

• Failure to open or crash when opening a view

• Crash when purging

• Crash when auditing

Here are a few reasons what can cause model corruption:

• Read Write error to the storage media o Hard drive out of space o Connection interrupted while syncing o Program crash during a write event and other operations where the model is in

the process of being modified. ▪ Train the users to submit the Customer Error Reports, as mentioned

before Autodesk monitors these proactively.

• Bugs in the application. These are usually fixed via updates or sometimes there are work arounds to prevent the bug from occurring. If your Revit is crashing, it is best to make sure ALL team members are on the same latest Revit update. Examples of some of the latest bugs in the software:

o Sun settings getting corrupted in 2017. o Families getting corrupted

• Add-in modifying Revit database incorrectly or not completing transactions completely.

• Sync operation interruption. Pressing cancel while syncing, or Undo after sync. AKN has a great article on this topic titled: What causes data corruption? http://autode.sk/2zqNQaQ. It also gives excellent tips on how to prevent the issues which were also discussed in this handout under Assess the Basics. In our recent experience while working on Autodesk Support tickets via Directly, we have seen a lot of the symptoms have been caused by either corrupt families or corrupt views. Here are some articles on AKN that can assist in the basics of file recovery

• Recover a Workshared model. http://autode.sk/2zxRIa8

• Recover a Non-Workshared model. http://autode.sk/2zxrNPI

• Recovery options for Collaboration for Revit models. http://autode.sk/2zvi24s

• Troubleshooting File issues. http://autode.sk/2zwOtPW

• Element has become corrupt. http://autode.sk/2zuSGE3

Corrupt Families If you’ve assessed the basics and your model is still crashing, then it’s time to begin the manual resuscitation process of first searching for corrupt families. Corrupt families are a big contributor of model crashes, inability to sync, model getting corrupted. Journal files may list some errors like

Page 10: BLD125158 Code Blue, Dr. Revit! How to Resuscitate Corrupt ... · • The Revit journals folder (for each version of Revit you have installed) is not an obvious location to check

Page | 10

• DBG_WARN: (asynchronous i.e. previously detected)Why no ElemRec?: line 119 of OwnerGraph\KingOf.cpp. • DBG_WARN: (asynchronous i.e. previously detected)Missing owner, or cycle of owners!: line 113 of OwnerGraph\KingOf.cpp. DBG_WARN: Failed to translate big ElemId.: line 217 of Family\FamilyDocument.cpp. Assertion failed: line 797 of ElemTable\Marshaller.cpp

Thankfully, there’s a (somewhat) easy process of determining which one(s) are…… palpitations…. Model. The process itself of searching for corrupt families is quite simple, but it can become very time-consuming the more corrupt families reside within the model. 1. Open the model using the detach from central option then save as a new central model 2. Save out the families. When Revit finds one that's corrupt, it will crash.

http://autode.sk/2y4xouN 3. Make note of the family that crashed Revit (the last family will be visible on the status bar

in the lower-left corner) 4. Close Revit 5. Reopen Revit 6. Open the central model from step 1. 7. Delete the corrupt family from step 3. 8. Save the model 9. Repeat steps 2-8 10. Repeat until Revit doesn't crash while saving the families. 11. Get clean copies of the original families and reload them into the model. It's essentially the same process as outlined in the Solution section of this AKN article. http://autode.sk/2i6ovOu

Finding the cancerous Elements

For a more detailed troubleshooting process borrowed from http://autode.sk/2zDsIhw When encountering unexpected behavior (e.g. crashes when accessing a particular view or selecting particular commands), you can fairly quickly check if the issue is related to elements within the project (by deleting "all" elements), and then narrow down and isolate the problematic elements. Solution: Warning! To avoid accidentally making unwanted and irreversible changes to your (production) project file, before going through any of the steps below, make a copy of the project (and if necessary linked project files) and only work with the copied file.

Overview: • Delete everything from the model. • Check if the unexpected behavior occurs (recreate elements to reproduce if necessary). • If the issue is cleared, delete items by category in groups until the specific problematic

element or elements are found. Detailed Steps:

Page 11: BLD125158 Code Blue, Dr. Revit! How to Resuscitate Corrupt ... · • The Revit journals folder (for each version of Revit you have installed) is not an obvious location to check

Page | 11

• If you have particular elements that you suspect are causing the issue, delete them, and test if the issue continues.

• Check the journal file recorded by Revit, to see if any specific elements are referenced prior to the issue (this might help isolate problematic elements faster).

• Delete all elements from the project by going through the following steps (and retesting after each deletion to find when, or if, the issue is cleared): Go to a default 3D view. Draw a crossing selection box (from bottom right to top left) over all the visible elements, and delete them. Delete all but one level Delete all of the project views, except for the default 3D view. Delete all of the schedules. Delete all of the sheets. Delete all of the loaded families. Delete any Design Options. Disable Worksharing. Delete loaded families from the project (select multiple family types in the Project Browser, right click and select Delete). Purge Unused objects from the project (you may need to run this several times to clear all possible items).

• If the issue stops after removing "everything" from the project, then we know it is related to one of the items removed. Start removing less elements to find the group responsible.

• If you find that the issue is related to one of the elements deleted (instead of a sheet, schedule, or view), go through the following steps to isolate the particular family or family instance:

• After selecting all the elements, and before deleting them, filter your selection by category, removing groups of categories. This will allow you to find the category of the problematic elements.

• Once you know the category, use the project browser to find all of the families associated with that category, expand the family, right click on it -> Select All Instances, and select In Entire Project. Remove groups of families within the category to find the specific family related to the issue.

• Once you have isolated the family related to the issue Select All Instances again, and then use the IDs of Selection command to get the Element ID for all of the family instances. Copy these IDs, paste them into a text editor, Select by ID in groups to find the specific element(s) associated with the issue.

Note: When dealing with issues that lead to a crash in the program, I have found it faster to delete several groups of objects, test for the behavior, undo the last deletion, test again, and repeat.

• Once you have identified the specific items causing the issue, try cutting to the clipboard (if possible) and then pasting back to the same place. If this does not work (or is not possible), remove the items and recreate them, but test to see if the issue returns at each stage (e.g. after drawing the object, after editing the profile, after changing parameters.)

If you’ve gone through this process and have cleaned up any corrupt families, or didn’t find any corrupt families, and your model is still having trouble breathing on its own, then it’s time to start analyzing the journal files.

Page 12: BLD125158 Code Blue, Dr. Revit! How to Resuscitate Corrupt ... · • The Revit journals folder (for each version of Revit you have installed) is not an obvious location to check

Page | 12

Revit - Failed to open document error This file is most probably beyond repair, refer to all else fails topic. Ensure that there is enough space on the hard drive, network connection is stable and empty the %TEMP% directory periodically. Too many Elements missing This error recovery rate is hit or miss. A lot of times, there are too many corrupt elements, Revit will stop processing the file. The journal file will have similar entries as shown.

A few things to try:

• I have run into issues where I was not able to open the file at all. However, if the model is open on someone's computer, that’s good news. Recently in 2017, this error has cropped up due to corrupt Sun Settings/View Templates, especially in the older builds prior to 2017.2.2. In the case above this happened where one of the team member was running an older build 2017.2.1.

o Get the latest Journal file from the computer having issues. o Search for the missing elements "missing elem" o Copy all the element id's and have them semicolon separated, i.e.

2761332;2955106;2975546 o Manage Tab > Inquiry Panel > Select by ID to locate the elements o Delete those elements. o Restore a backup of the file that is not corrupt. o Again, select all the elements that were corrupt using Manage Tab > Inquiry

Panel > Select by ID o Copy to Clipboard o In the file having issues, in a 3D view Paste Aligned to Same Place. o Selectively Purge 3 times o Save the file locally o Create a copy of the Local file o Sync with Central with the Compact Central Model two times. o Have the other use create a new local with the Audit option checked.

Page 13: BLD125158 Code Blue, Dr. Revit! How to Resuscitate Corrupt ... · • The Revit journals folder (for each version of Revit you have installed) is not an obvious location to check

Page | 13

o Autodesk has a AKN article with the process in detail. http://autode.sk/2iIbrvC . However, they recommend using an older model that is stable. However sometimes, this error causes all backups to be corrupt as well and the model cannot be restored.

• Rename the file and try opening the file, a few times this trick worked.

• Try opening with Audit open

• Try opening without Audit, all worksets open/closed.

• Try opening it a new Revit version. This is not ideal, but it is an option to consider.

We have also noticed that a lot of times Restore from Backup function also fails to recover the model. In this case the project file must be sent to Autodesk. Autodesk has special Developer builds that can bypass some of the errors and recover the file. Refer to the "If all else fails" topic for sending the correct information that support requires the first time. *In most cases the backups, including the local backups will also be corrupted as mentioned above. I have a recommendation that the Snapshot feature of the Fileserver should be used, say every hour. This will allow you to recover a problematic model.

• Recover a working snapshot copy of the central model RVT file to your local hard drive.

• Open the old model, which will become a Local file to the central model.

• Use Reload Latest.

• Save the Local file.

• Open the Local file with Audit option checked.

• Purge

• Create a new Central model with Compact, Central, and Regenerate view checked.

• All users should create new locals.

Tools for Troubleshooting Unexpected Behavior in Revit

From http://autode.sk/2zEJBZg

Manage Links Transfer Project Standards View Templates Project Browser Cut and Paste Visibility/Graphic Overrides Dialog

Note: When using Revit tools for troubleshooting purposes, you might make changes that you will not want to keep. To avoid accidentally making unwanted changes to your project file, before going through any of the steps below, make a copy of the project (and if necessary linked project files) and only work with the copied file. When troubleshooting a project-specific issue, get the following information. (This information is good for troubleshooting most software issues):

• What is happening exactly, and why is it unexpected? (If you are the one with the issue, this information should be easy to get.) This information is important because if you don't have a clear idea of what you are trying to fix, then it is hard to know if (and when) you have fixed it.

Page 14: BLD125158 Code Blue, Dr. Revit! How to Resuscitate Corrupt ... · • The Revit journals folder (for each version of Revit you have installed) is not an obvious location to check

Page | 14

• Has this function worked in the past? o -- Yes - Find what has changed between when it last worked and now (different

computer, network, hardware, software, add-ins, etc) o No - You may also need to verify that the process is supposed to work.

• Is your product updated? Check to make sure there are no updates that you can apply.

• It is a good idea to apply product updates when troubleshooting unexpected behavior (as updates often resolve such issues). In addition, if you are working with someone else to troubleshoot the issue, make sure everyone is using the same product version.

• Manage Links/Linked Files:

• Linked files can cause unexpected behavior in Revit, such as unexpected display of linked elements or crashing, or they can prevent a project file from opening in the first place.

• If you can't open the host project file, try copying it to a location without the linked files, and verify whether you can open it. If you can open it, then you can begin determining which linked file is preventing the project from opening. (If you find that you can only have a certain number of any given linked files loaded, you may be seeing a resource-related issue).

• If you can open the project, but are seeing unexpected behavior, a good first step is to go into the Manage Links dialog (on the Insert ribbon tab), and remove all linked files from the project to see if the issue is related to one (or more) of the linked files.

• Transfer Project Standards:

• Sometimes, one project is not working like another, and you don't know what setting in Revit is causing the different behavior. To clear the issue, you can try transferring all the project standards from the working project to the problematic one. To narrow down what setting was causing the issue (if transferring all of the project standards fixes the issue), you can transfer them in groups, or individually until you find the specific category that clears the issue. Then compare the category settings between the two projects

• View Templates:

• Occasionally you may find that one view, is not behaving like other views in your project. In this situation you can create a view template from the view that is working as you expect, and apply that template to the problematic view. If the issue is cleared, you can modify the view template to apply fewer settings and determine what specific category was different between the views.

• Project Browser:

• The Project Browser is the tool that allows you to access the different views in your project. It also allows you to access and manipulate Families, Groups, and Revit Links.

• If you suspect a particular group is causing issues in your project, you can find the group in the Project Browser, right-click it, and click Select All Instances -> In entire Project. Once all instances are selected, you can ungroup them or remove them from the project.

• If a particular family is not working expected, and you want to remove and reload the family, you can use the steps above to select all instances in the project, and then use the Type Selector to change the instances to a temporary family type. (To do this, create a new family type on a different family in the same category and then change the instances to the new family type.) Remove the existing family (which no longer has any instances), reload the family into the project, and then change the previous family instances back to their original family type.

Page 15: BLD125158 Code Blue, Dr. Revit! How to Resuscitate Corrupt ... · • The Revit journals folder (for each version of Revit you have installed) is not an obvious location to check

Page | 15

• If you suspect that one or more families are causing an error in your project, you can use the project browser to remove all of the families (except for a single instance of each system family type) and verify whether the error is cleared. If the error is cleared, you can then narrow down what family or families were involved with the error.

Note: Removing the family removes the family instances. It is possible an error could be related to a particular instance of the family, and not the family itself. This leads to the next tool.

• Cut and Paste: If you find a particular element in the project is not behaving as expected, you can try recreating it by Cutting it to the clipboard, and then pasting it aligned to the same place.

• Visibility/Graphic Overrides Dialog: This dialog controls the display of elements based on their category. If certain categories of elements are missing from your view, you can check whether they are turned off in the view using this dialog. Additionally, if you cannot open a particular view (or views), you can use this dialog to find the category of element (or elements) preventing the view from opening.

• Select the problematic view (to highlight it without opening it). This gives you access to the view properties.

• Select Edit (next to Visibility/Graphics Overrides).

• Turn off the visibility of everything under all the tabs, and click OK.

• Try opening the view.

• If the view opens with everything turned off, start turning categories back on until you find the ones causing the issue.

• Once you have narrowed down the specific category, you can select these elements from a different view (like a section), get their element IDs (using the IDs of Selection command), and then remove them from the project until you find the specific element or elements causing the issue.

Understanding Journal Files Many operating systems and software applications have a method of logging messages, errors, output, etc. in file(s) typically referred to as Log files. These files are used to diagnose issues or making sure that the program is working correctly. These are typically plain TEXT files that can easily be opened in variety of software, like Notepad. Revit is no different in logging various information about the current Revit session and refers to these logs as Journals. Journals contain valuable information that can be used to help in troubleshooting various issues encountered with Revit performance, stability or Revit file health. However not officially supported anymore, these can also be used to perform automated scripting in Revit, especially in older version when there was no programming interface (API) was available.

• Revit Build/Version

• Hardware details o Processor o Video card o Printers

• Memory usage

• User Name

Page 16: BLD125158 Code Blue, Dr. Revit! How to Resuscitate Corrupt ... · • The Revit journals folder (for each version of Revit you have installed) is not an obvious location to check

Page | 16

• Path to Central Model

• Path to Server

• Template Path

• Timing information

• Loaded plugins

• Linked files

• Commands issued

• Results of various commands

• Element borrowing and relinquish data. CENTRAL BORROWS

• Sync command results

• Elements created or modified

• Debug messages

• Diagnostic data

Journal files are located in the current users %LocalAppdata% folder. This folder also contains backups of families edited, non-workshared networked project backup file and other diagnostic files.

%LOCALAPPDATA%\Autodesk\Revit\<Product name and release>\Journals

A Journal file is created for each session of Revit, and number increments i.e journal.0234.txt, journal.0235.txt. The highest numbered file, is for the last session loaded on the computer. Each version has its own Journal folder. Autodesk’s article explains detailed information on where to find these files. http://autode.sk/2vHGzBK

TIP: My favorite way to quickly access various Windows system folders is by typing %ENVIRONTMENT_VARIABLE% in the Windows (File) Explorer address bar or using the Run Command box by pressing Winkey+R Refer to this Technet article for more information on Environment variables. http://bit.ly/2yF6lJU . Another way to find and check the Environment variables is to open a Command prompt and type SET . This will list all the variables and its assigned values. I use this trick to find out the current setting for Revit Server Accelerator settings, without opening up Revit, or if I wanted to check while Revit is busy with a Sync.

Journal Content • Reading between the lines.

o Commands and Actions are preceded by the Jrn.xxx and comma “,” paired with an underscore at end of the last line. The underscore represents continuation of the command on the next line.

o An apostrophe ‘ represents a comment, diagnostic messages, Errors, Time and

memory stamps, etc.

Page 17: BLD125158 Code Blue, Dr. Revit! How to Resuscitate Corrupt ... · • The Revit journals folder (for each version of Revit you have installed) is not an obvious location to check

Page | 17

o As mentioned before that Journal files can be used to script Revit. Though not in the standard Journal file (except the variable definition Jrn), you can use VBA like script in Journal files as well. There is an example of a Journal script included in the class dataset. The script allows you to mass upgrade families to the current version. This script was hidden away in the previous versions, but deprecated in 2016 onwards.

• Basic Hardware & Software information

• Initially available Virtual Memory (VM), Physical Ram (RAM) & GDI resources. Revit constantly logs this data as you use the program throughout the Journal file. Many times, lack of these resources will cause performance issues, crashes, or data corruption. There is more detailed information available later in the file. +`

• Time stamp

• Build number. Each Revit release and updates have a Build number associated. Refer to http://autode.sk/2vDd1qx on how to tie the Build number to a Revit update. This is the first thing to check when diagnosing any issues. If the software is not up-to-date, it is recommended to update the to the latest release and see if the problem is resolved. In a work-shared environment, it is important to make sure all users accessing a central file(s) are on the same Build.

TIP: Refer to the SLOG file details to quickly check Build numbers for all team members.

2018 Build Version (Control Panel)

Build Number

First Customer Ship 18.0.0.420 20170223_1515

Page 18: BLD125158 Code Blue, Dr. Revit! How to Resuscitate Corrupt ... · • The Revit journals folder (for each version of Revit you have installed) is not an obvious location to check

Page | 18

2018.1.1 18.1.1.18 20170907_2315

2018.2 18.2.0.51 20170927_1515

• dotNet version dotNetInstalledVersionString

Sometimes having a too recent version of dotNet or very old version can cause Revit or 3rd Party Add-ins to crash. If you are experiencing these symptoms, review whether there was a recent Windows update. This usually happens on a Tuesday or Wednesday based on the Microsoft update release cycle.

• Hardware Acceleration turned on or not. o For a weaker graphics card, turning off Hardware Acceleration can sometimes

prevent Revit from crashing, or leaving artifacts on the screen.

o Various Add-ins installed. A successful load shows up as API_SUCCESS and any issues with the plugin will be listed as API_ERROR

o Video Graphics Card and Driver Installed

▪ If the graphics driver is too old, or new can cause Revit to malfunction as well. Verify that the machine has the Latest certified driver (or WHQL) installed. Refer to Assess the Basics for verifying the graphics drivers.

Page 19: BLD125158 Code Blue, Dr. Revit! How to Resuscitate Corrupt ... · • The Revit journals folder (for each version of Revit you have installed) is not an obvious location to check

Page | 19

▪ OPERATING SYSTEM INFORMATION

PROCESSOR INFORMATION. Shows the Name and other various metrics regarding the installed processor.

▪ VIDEO CONTROLLER INFORMATION (Detailed Video Card and Driver Information)

▪ PRINTER INFORMATION Contains all the printers installed

• Interpreting Audit Results:

o If the Audit box is checked, Information or errors are usually listed between BEGIN and END of DUMP. In the case above, there is one family "subvak" that is corrupt which leads to Revit file corruption. Some of the symptoms include, unable to open project file, inability to sync to central, crash upon opening a view, etc. If the project fails to open or if it opens, it is best to delete the families that are corrupt.

o Audit also reports all the previous versions that the file was created and used to manipulate. In the example above the project was started in Revit 2013, and upgraded to 2014, 2015 and 2017, skipping 2016.

' 3:< ======== BEGIN Dump Content Doc Tree (audit) ======== ' 3:< Family NAMING INCONSISTENCY for 6e82da02-1485-4ee0-871a-93368c045775: ' 3:< [subvak] ' 3:< , [subvak2] ' 3:< ======== END Dump Content Doc Tree (audit) ======== DBG_WARN: The Content Doc Tree is corrupt and could not be repaired.: line 512 of Document\PostLoadDocument.cpp. ' 3:< Document save history --> : ' 3:< Revit 2013 2013 (2013.000) : 20120221_2030(x64) ………. ' 3:< Revit 2017 2017 (2017.000) : 20170419_0315(x64) ' 3:< Revit 2017 2017 (2017.000) : 20170816_0615(x64) ' 3:< Document save history <--

Page 20: BLD125158 Code Blue, Dr. Revit! How to Resuscitate Corrupt ... · • The Revit journals folder (for each version of Revit you have installed) is not an obvious location to check

Page | 20

• Some keywords to look for in the Journal file

Please refer to using Notepad++ and the Analyse Plugin instructions to search the file quickly with the keywords to color code the items to look for.

There are some great troubleshooting tips in the Revit help document online http://bit.ly/2zv0qpj.

o DBG_INFO refers to diagnostic/debug messages. In most cases these can be ignored, however

10:< DBG_INFO: Get addresses failed (using getaddrinfo) for central server SRV-SANFRAN02: No such host is known. : line 622 of Worksharing\WorksharingLog.cpp.

In the example, all it is referring to is that the path of the central server SRV-SANFRAN02 cannot be resolved. This message gets logged when loading a Linked model that was received from a consultant. Revit loads the link, however it cannot find path to the original central server registered in the linked central file path.

o DBG_WARN refers to a major error. It could be triggered by corrupt elements, bad families. There are many different errors and would be out of the scope of this class to cover.

o DBG_ERROR refers to a major error. It could be triggered by corrupt elements and other

o Exception Exceptions are thrown typically before Revit crashes. If you search for ‘Exception’ look for lines above the exception to research what could have caused the error. There are many reasons why Revit crashes, refer to the 'Assess the Basics' topic to see if the problem gets resolved. As an example, 'CFileException' which typically relates to errors reading/writing a file.

' 2:< DSI::loadPermissionsFiles error CFileException m_cause=10 m_lOsError=59 file [\\....\13137.03_Infill_R17_backup\users.dat] Encountered a hardware I/O error while accessing \\…\13137.03_Infill_R17_backup\users.dat

If Revit crashes, the journal file will always have the ExceptionCode (This is something the developers know and is not public knowledge), Flags and Address. Sometimes a few lines above that you might be able to decipher what caused the issue. In the case below, there was an issue with an element or family being corrupt. This is usually fixed by Auditing the model. In this case the user had an older build of Revit and caused the Schema to go corrupt. Course of action was to update the Revit to current build, open the model with Audit, and then Sync two times with Compact option.

' 4:< DBG_WARN: Missing ESSchema: GUID fd3b7a08-bf86-4a12-ba69-c265e5b4f973: line 1397 of Archive\DataDict.cpp. ' 4:< An ArchiveException 105 is raised at line 1398 of Archive\DataDict.cpp: Missing ESSchema: GUID fd3b7a08-bf86-4a12-ba69-c265e5b4f973 'C 09-Nov-2017 16:51:16.866; 4:< Assertion failed: line 386 of ElemTable\Unmarshaller.cpp ' 4:< Exception occurred 'C 09-Nov-2017 16:51:16.871; 4:< ExceptionCode=0xe06d7363 ExceptionFlags=0x00000001 ExceptionAddress=00007FFEE71A3FB8

Page 21: BLD125158 Code Blue, Dr. Revit! How to Resuscitate Corrupt ... · • The Revit journals folder (for each version of Revit you have installed) is not an obvious location to check

Page | 21

o Crash Crashes are logged in both the Journal file and SLOG file as well. If you are reviewing an SLOG file for a project file, you can review trends who and when someone is crashing. This could be used for proactively monitoring office wide projects. See Reading SLOG files for more details.

o BadGeomError This will sometimes show up in families. In the case below the family has some errors generating the geometry. Fixing the issue will require editing the family and adjusting the geometry to get rid of the error. The families are from a well-known furniture manufacturer. The lesson here is to make sure to vet the families used in the project. Review the project journals to see if there are families that are misbehaving.

o Error This is the most common occurring keyword, so when parsing journal files, make sure to review the 'error' hits. This can sometimes help proactively prevent project file corruption.

o Element IDs Some of the errors mentioned above will have an Element ID associated

with it. Element IDs show up many ways. These IDs can help us find the objects in the project easily. Once the ID is known of an Element, Use the Manage > Select by ID. You can use multiple IDs in the input box separated by semicolons. Examples of Element IDs:

' 8:< DBG_WARN: Missing GStyle in RvtLinkInstance::getOrAddProxyDBView: 'Dash Dot 3/8'' (id = 148738): line 2850 of Elem\RvtLinkInstance.cpp. ' 0:< ;PERF;MISC;ElementsGraphicCacheUpdater::updateAll() DBViewSection id=7024091: 214(100%) elements need cache update

Page 22: BLD125158 Code Blue, Dr. Revit! How to Resuscitate Corrupt ... · • The Revit journals folder (for each version of Revit you have installed) is not an obvious location to check

Page | 22

' 2:< DBG_INFO: When constructing ElementRecord, elem 9065154 not found: line 35 of d:\r2\2017_px64\source\revit\revitdb\elemtable\ElementRecord.cpp. 6310: 'C 30-Oct-2017 10:38:11.409; 5:< [nmysorewala] acquired element 9055593: ' Detail Lines ', in workset ' View "Detail View: PLAN - CW AT SE CORNER" ' '13:< DBG_INFO: propagationFromTransientToNonTransient: suppressed: Step InstPlacement of FamilyInstance {25894651} (-1: InsertableInstTrfRegenStep) of non-transient element reports DatumPlane of Level {25894650} (-1: DoNothingStepBase) of transient element as its parent: line 2169 of d:\r2\2017_px64\source\revit\revitdb\regen\ADocumentRegen.cpp.

The ElementRecord.cpp refers to the module / function in the code written in C++. Also it is listing the FamilyIntance 25894651 has some issue. Use the Select By ID function to find the Instance in the model The line that starts with 6310 above is identifying that userid nmysorewala has borrowed the element 9055593 on the listed workset.

o missing elem ####### Refer to Too many elements missing topic for more detail on this error and recovery.

o GUID GUIDs are listed in the Journal files mostly for transactions and elements. Revit uses both Element ID and GUID for each element. If you are trying to troubleshoot issues with Revit Server or C4R those could assist by corelating the Operation GUID in the ModelService.log file on the Revit Server. Every model and Revit file has a GUID associated with it as well.

' 0:< Operation - RSEnterpriseClientInterop::locateModel: SessionToken: User's Name User1, User's Machine Name User1P50, Operation GUID 087ad1b2-28a8-44ce-9eff-09a4b5f122d3

SLOG Files .slog file, Worksharing Log File, is part of the _backup folder for the central model. It is found inside the folder Central_File_backup where the Central_File.rvt is located. This file contains progress information on Sync with central, element borrowing and users accessing the central file. The .slog file is encoded using UTF16. Besides the .slog file the Central_File_backup folder contains files that store information related to the central file. Besides the obvious number of backups (set under the Save->Options dialog box) it also contains DAT files, permissions for editability and ownership status. Before exploring the .slog file for diagnosing issues, let's look at some of the files found in the _backup folder. WARNING: DO NOT OPEN OR EDIT ANY FILES ON A LIVE PROJECT. Always copy these files before interacting with them. The only file that you really want to access for troubleshooting is the .slog file. All other files and types listed here are just for information.

• *.rws files have the actual element data inside. If you notice large files, these are holding the elements in a User Workset.

• eperms.dat file contains all element editing permissions.

• Basicfileinfo.xxxx.dat this file contains the information regarding the central model. Central Model Path, Revit Version and Build, Central Model GUID and Identity and Number of times model had been synced. Can be viewed with Notepad.

• projectinformation.xxxx.dat A PKZip (Hint: Use 7Zip) compressed file containing project xml file which has the Project Information parameters and data. The only time I use it is to

Page 23: BLD125158 Code Blue, Dr. Revit! How to Resuscitate Corrupt ... · • The Revit journals folder (for each version of Revit you have installed) is not an obvious location to check

Page | 23

identify a model identity on a Revit Server Accelerator cache folder. Since all the folders are based on the Model GUID, it is hard to identify which folder is associated with a Revit file. Since we do not have access to the Host Revit server in some cases. <A:design-file><A:title>Project_ARCH_13671_R17.rvt</A:title>

• users.dat contains all the usernames that have accessed the model. It is a binary file but can be viewed in Notepad.

• preview.xxxx.dat This has the rvt file Preview image. Not viewable, but it can cause not being able to recover central file backups. If you are trying to recover the project backup you are greeted with "An unknown error occurred while accessing filename.rvt" and then Failed to extract old document version. The error is described here http://bit.ly/2ioifP1. However, the fix is not. Refer to the fixes topic to recover from this.

.slog Reading between the lines.

Typically .slog files are read in combination with the Journal file to troubleshoot the issue. However, there is other diagnostic information available in the file. Worksharing monitor, if used, will also use the information to display status.

• Terminology: Some of the basic abbreviations and terminology listed below. Some of them are my educated guesses, so if there are mistakes in my interpretation, please send me a note.

> Beginning of an action, i.e. >STC user's beginning Sync To Central

< Ending of an action, i.e. <STC user's end of Sync To Central. Ideally, each Start entry should have an Ending entry. This indicates successful transaction

user="xx" Session ID

Username associated with the local user in their Revit options dialog. Every time a user creates a new connection to the central file, a Session ID is assigned. This ID is then used to track all the interactions that the user has with the central file. transactions are both logged in the .slog file and the user's Journal file. Connecting the Session ID to the user is important to be able to diagnose which user performed what command. In the following case the user 'revituser1' = '$623fbc77' and they accessed the Worksharing

dialog.

build= User's Revit Version/Build accessing the central file. Every users Revit build number is registered in the .slog file. Revit Support recommendation is that ALL users accessing the central model be

Page 24: BLD125158 Code Blue, Dr. Revit! How to Resuscitate Corrupt ... · • The Revit journals folder (for each version of Revit you have installed) is not an obvious location to check

Page | 24

on the same build, preferably latest, to avoid model corruption. Check here for the Build numbers on Autodesk's website http://autode.sk/2vDd1qx. A quick way to check the build numbers for users accessing can be achieved using a simple batch file "SLOG Check User-Build.bat" I utilized PowerShell since the file is UTF16 encoded and FINDSTR DOS command will not work on the file unless converted to UTF8. To use the tool just drag n drop the Central_File.slog file on the BAT file. It will generate a text file. Central_File.slog_rpt.txt and open it up in Notepad. In the example above, as of this date, the latest build for Revit 2017 is 20170816_0615 (2017.2.2) and the file indicates that some of the users are on an older build. The course of action is to install the latest update on 'revituser2' and 'revituser5' machines.

Session >Session $623fbc77 hex ID assigned to the user shown in the next line. If the user's session ended normally, the slog file will have a <Session closing line.

WSD Worksharing Dialog User selected Specify for Worksets when opening the file. These entries will show up if the users uses the Work Sharing Dialog during the session as well.

R Read, typically with locked or unlocked

RW Read Write, typically with locked or unlocked

Page 25: BLD125158 Code Blue, Dr. Revit! How to Resuscitate Corrupt ... · • The Revit journals folder (for each version of Revit you have installed) is not an obvious location to check

Page | 25

locked unlocked Each element table transaction is first locked and then unlocked. It could be for Read or Read Write. If there are issues with slowness

and you constantly get the dialog, it might be good to review the SLOG to see who is holding up the queue.

RL Reload Latest. >RL Start Reload Latest <RL End Reload Latest

STC Sync To Central (Synchronize with central) A typical successful Sync process example. The important thing we are looking for here is a complete pair of >STC <STC. This indicates that the Sync by the user was successful >STC Start Sync >STC:STL Start Save To Local … .STC:RL:CFV central=4 Central File Version? Or Verification.

Since it is a counter I think it is version. If it is 4 below it should increment up.

<STC:STL End Save to Local >STC:RL Start Reload Latest <STC:RL End Reload Latest >STC:Save Save changes to Central file ….. <STC:Save End saving changes to Central file .STC:CFV central=5. Increment up after saving to central. >STC:STL Again begin save to local <STC:STL End save to local <STC End Sync

STL Save to Local

OpenLink Opening of a linked file listed on the same line.

ME:MEE:LockUsers RW locked ME:MEE:LockUsers RW unlocked ME:MWE

Element Borrowing entries are recorded as such in the worksharing log. ME Make Editable , ME:MEE Make Element(s) Editable, ME:MWE Make Workset Editable

central=### local=###

Some transactions in the slog file have a counter related to how many times a central file has been synced and local file as well.

WSM Worksharing Monitor entries.

Page 26: BLD125158 Code Blue, Dr. Revit! How to Resuscitate Corrupt ... · • The Revit journals folder (for each version of Revit you have installed) is not an obvious location to check

Page | 26

Crash Refer to the Crash topic under Understanding Journal Files topic.

ReConnectInMiddle This means that the network connection was interrupted while performing an action. This typically will result in a model corruption

Analyzing Journal Files

Steps We have covered in detail the where to locate Journals, what to look for in the Journal files, lets cover how to go about making it easier to read these. Steps

• Collect the user Journal files

• Collect the model(s)

• Collect the SLOG file (if needed)

• Try to replicate the issue in a new session of Revit so there is a clean Journal file

Generating a clean relevant Journal file

• Close Revit completely

• Reopen Revit

• Reopen the file and Reproduce the issue

• Without closing collect the latest Journal file (the highest numbered)

BIMologist's & BIMAvenger's Tool chest When it comes to troubleshooting errors, Revit crashes, analyzing Journal and .slog files I mostly use

• Notepad++

• Analyse Plugin

• Procmon

• Simple batch scripts. Some are included in the Dataset.

• Revit Plugins

Installing Tools Notepad++ (NPP)

Free extremely powerful text editor, code editor with extensive plugin support. Download 32bit version from https://notepad-plus-plus.org/ . 64bit can handle bigger files, however a lot of plugins are not compatible.

Notepad++ Instal ler 32 -bit x86: Take this one i f you have no idea which one you should take.

Install using the default options, or you can customize to suit. I typically uncheck the Updater. For further detail on using Notepad++ review the NPP Wiki at http://bit.ly/2iLbYwZ Plugins for NPP can be found at http://bit.ly/2zytJY6

Analyse Plugin

Download the plugin from http://bit.ly/2zysZCi Extract the ZIP file

Page 27: BLD125158 Code Blue, Dr. Revit! How to Resuscitate Corrupt ... · • The Revit journals folder (for each version of Revit you have installed) is not an obvious location to check

Page | 27

Settings -> Import -> Import plugin(s) Browse to the extracted folder and import the AnalysePlugin.dll Plugins Once installed, Under PluginsAnalysePluginShow Analyse Dialog Once the Dialog opens on the right side, Click Load, then Load File. Browse to the Dataset folder for the Class and load the Revit Journal AnalysePlugin_Mysorewala.xml This will load all the keywords to quickly search through the journal files

Batch Files I am old school and still can easily write DOS batch files and I decided to stick to that. Powershell provides tremendous power, however most of the stuff I need to do can be achieved with Batch files. I have included a few examples I utilize

• SLOG Check User-Build.bat – Gives a quick list of Usernames and Builds they are on.

• SLOG Check User-Build-Session.bat – Gives quick list of Usernames, Build and SessionID number

• ParseRevitJournal.bat – Gives a quick parsed Journal file text matching keywords defind in the ParseRevitJournalKeyword.txt file. That file needs to me in the same directory as the BAT file. Currently it only accepts strings, but can easily be modified to add regex expressions.

• ParseRevitJournalSLOGSTCCheck.bat – This is a quick way to make sure the Syncs and intermediate operations completed successfully. Drag n Drop a Journal or Slog file and it will output a text file listing only >STC <STC items. The key here is to make sure that there is always a pair > Start < Finish for each operation. See Journal file descriptions for more detail.

Revit Plugins • pyRevit – A free, open source, excellent set of tools to perform maintenance operations or navigating the model. http://bit.ly/2yriwr0

• RQuick Select – Free, handy selection by element type and its properties tool http://bit.ly/2ysdx9K

• Family Size Reporter - This is a great tool to verify all the families. It can work in lieu of saving all the families to identify corrupt families in

Page 28: BLD125158 Code Blue, Dr. Revit! How to Resuscitate Corrupt ... · • The Revit journals folder (for each version of Revit you have installed) is not an obvious location to check

Page | 28

the project. It is also great at identifying families that are large in size, use Import objects, nested families, etc.. http://bit.ly/2iAs50e

• Juan Osborne Tools – Refer to my article at http://autode.sk/2ysdFGg regarding these awesome free tools.

Other Tools

(not part of the demo)

I was already using Notepad++ to analyze journal files, Revit server Autosync and Modelservice log files. After reviewing the ATA 2014 training presentation document (included in the dataset or at http://autode.sk/2zxFYo5), I settled on using NPP and Analyse Plugin. I was already familiar with NPP so it made it easier. In the ATA document they do mention other tools, and there are many more that can assist with the investigation. For proactive analysis of the journal and SLOG file, a script that extracts data from Journals works beautifully. However, for analyzing issues with crashes or file errors they do not work well. The issue is that you cannot see the whole context, timing, memory usage, command used before and after, etc. That’s the reason why I prefer using NPP. I can have the Journal file color coded, and SLOG file side-by-side to analyze the issues. A few other tools:

• Revit Clinic Journal Parser Script - I have included this in the dataset. The only issue is that it provides you with the basics of hardware and Revit version. It can be expanded to include more keyword searches.

• Agent Ransack – Searches multiple files with different keywords. http://bit.ly/2zxUhsI

• Baretail – This provides live feed and colorizes keywords. http://bit.ly/2zxEpX3 . I think you need a paid version to be able to save keywords, etc. This is an extremely powerful tool that I learned about from Autodesk Tech, Lars-Ake. During the early stages of C4R we were experiencing extreme slowdowns syncing with the project. This tool allows you to review the Journal stream live and colorize the keywords as you perform actions. This can give you live feedback of slowdowns, etc.

• Notepad – Basic search functionality. Slow with larger files.

• Dynamo Scripts – Last year I attended a class at AU 2016 Revit Analytics with Dynamo. Colin has a Dynamo graph that extracts data from journal files. http://autode.sk/2zwD9TX or try the bakery http://bit.ly/2iJHdsi

• Procmon – Process Monitor is a monitoring tool for Windows that shows real-time file system, Registry and process/thread activity. I use it for troubleshooting Revit/AutoCAD performance issues, like Revit pausing during some operations. It shows live OS transactions for File, Registry, & Network using powerful filters.

Page 29: BLD125158 Code Blue, Dr. Revit! How to Resuscitate Corrupt ... · • The Revit journals folder (for each version of Revit you have installed) is not an obvious location to check

Page | 29

Let's Operate We may have been able to resuscitate our patient, Revit project, the key is sometimes to figure out what went wrong and address the issue. This is where the tools above come into play. We have the Journal file to review. It's time to pull out our scalpel by launching Notepad++. If you installed NPP with defaults, you can just right click on the Journal.xxxx.txt file and select Edit with Notepad++.

Notepad++ and Analyse Plugin:

To best illustrate the use of the tool I am including an actual example, with permission from the owner, to illustrate diagnosing and fixing the issue using the tools. I am including some video links while I work through the issue. The issue: Description: We have been having issues on a project with linked files. It is a bit Random but when we open a Workset with a linked file Revit will sometimes crash and give a Serious Error has occurred. We have re-created all of the central models and this is still happening. It seems to be when loading or unloading linked files. I have attached the Journal files from a PC that crashed and you can see the errors in there. All of the team have the latest build of Revit 2016 Update 7 for R2. Could you have a look at the attached files to see if you can find out what's wrong?

This issue was causing a soft Revit crash. It was by reading the Journal and replicating it on my end, I could pinpoint the issue and come up with a solution. Reviewing the Journal file in Notepad++ - http://bit.ly/2mfrS7B Duplicating the issue in Revit and generating clean Journal file - http://bit.ly/2zwJP7g

Page 30: BLD125158 Code Blue, Dr. Revit! How to Resuscitate Corrupt ... · • The Revit journals folder (for each version of Revit you have installed) is not an obvious location to check

Page | 30

I reviewed the 11024-ABC-B2-ZZ-M3-A-0001.rvt model ' 9:< --TB- Level 585921 - Levels : Level : Level 05 '10:< DBG_WARN: Planar curve is on tilted plane.: line 1365 of RegionMaker.cpp. ' 9:< DBG_ERROR: New room algorithm failed.: line 3121 of Elem\PlanTopologyImpl.cpp. ' 9:< Error posted: ' 9:< Room computations failed. Try to modify the following elements. 'C 14-Sep-2017 09:31:46.502; 8:< Assertion failed: line 572 of Elem\PlanTopology.cpp 'C 14-Sep-2017 09:31:46.507; 6:< System exception in ADocument::regenerate 'C 14-Sep-2017 09:31:46.507; 6:< executing step 'C 14-Sep-2017 09:31:46.507; 6:< element 369 of type AllPlanTopologies

The element ID 369 is Room and Area Computations (Select by ID). it is somehow creating a System exception. I reviewed the lines above the System exception and realized that every time DBG_WARN tilted plane shows up just below Level 5. I tried to modify Level 5 and it gave me the same error. Then looking at the Planar Curve is tilted, I went back to the Warnings. There were some reference planes that are off axis. This narrowed me down to the Walls 1755812,1755813 as indicated in the warnings dialog I could not modify those and some Reference Plane are associated in them and are complaining about being off axis

Page 31: BLD125158 Code Blue, Dr. Revit! How to Resuscitate Corrupt ... · • The Revit journals folder (for each version of Revit you have installed) is not an obvious location to check

Page | 31

Nonetheless, Since the issue lies with the Room and Area computation, I think with all the OVERLAPPING walls, and Room separation lines, and some profile editing of the walls could have corrupted the rooms. I was able to remove the error by 1. Going to the Room Area Schedule. 2. Delete all Unplaced rooms 3. Delete all rooms on 5th floor Tried loading the worksets or editing the wall. I was successfully able to do both. Hope this walk through is helpful in understanding the process of diagnosis.

Network Disconnect Issue example

This analysis is courtesy of Greg Wesner at Panzura who helped us diagnose this issue. We had the project model getting corrupted twice over a course of the week. The issue was the one of the user was working on the model and performing SWC when connected to the office via VPN on an unreliable WIFI connection. "The root cause of the corrupt model is that user rvtuser1 was in the middle of a SWC when they lost their network connection. This could not have occurred at a worse time because not only were they in the middle of a SWC but they had the RVT locked and were writing to it at the time they lost their network connection. Looking at rvtuser1's journal.0145.txt we can see the following key events: (Start SWC) ' 1:< SLOG $18d7e026 2017-03-09 13:30:02.182 >STC Begin SWC USERID (Lock the RVT file for write) ' 3:< SLOG $18d7e026 2017-03-09 13:30:11.317 >STC:RL ' 5:< SLOG $18d7e026 2017-03-09 13:30:11.359 .STC:RL:LockRoot RW locked (Network connection lost) ' 3:< SLOG $18d7e026 2017-03-09 13:37:36.100 .STC:Save:Error "The specified network name is no longer available. " ' 0:< [000033a0]DBG_INFO: Fatal error (64) when writing to Slog.: line 2143 of Worksharing\WorksharingLog.cpp. 'C 09-Mar-2017 13:37:36.103; 3:< Save exception "COleException", code=0x80070040: The specified network name is no longer available. (Network connection re-established) ' 4:< SLOG $18d7e026 2017-03-09 13:38:02.065 .STC:ReconnectInMiddle $18d7e026 ' 4:< SLOG user="krvtuser1" ' 4:< SLOG build="2015 20160512_0715(x64)" ' 4:< SLOG journal="C:\Users\krvtuser1\AppData\Local\Autodesk\Revit\Autodesk Revit Architecture 2015\Journals\journal.0145.txt" ' 4:< SLOG host=fe80::ef:a372:16b1:a982%11 "RVTUSER1W530.gbbnarch.com"

Page 32: BLD125158 Code Blue, Dr. Revit! How to Resuscitate Corrupt ... · • The Revit journals folder (for each version of Revit you have installed) is not an obvious location to check

Page | 32

' 4:< SLOG server=192.168.44.9 "gbbnarch.com" ' 4:< SLOG central="J:\13515\6. Drawings\6.00 Current\2 Revit\Arch-13515-R15.rvt" ' 4:< SLOG local="C:\RevitLocal\Arch-13515-R15_krvtuser1.rvt" ' 4:< SLOG timer="pulse-18d7e026.tmp" ' 4:< SLOG timebias=300 (RVT file is unlocked but the damage is done) ' 3:< SLOG $18d7e026 2017-03-09 13:38:02.089 .STC:LockRoot RW unlocked If a network connection is lost when writing to a file, there is just no way to reliably reconnect and continue writing. Note that the entry in the SLOG that says "the specified network name is no longer available" was probably not actually written to the SLOG because the connection was not there. After the connection is re-established, it is obvious Revit did not attempt to continue writing the file because only a few lines later in the journal it unlocks the root and closes out the STC. It's actually surprising it does these cleanup steps at all. On a side note and a completely separate observation: The SWC was well over 5 minutes into the process before the connection was dropped. In this process, Revit locks and unlocks several files. In this case I noticed it locked the Users.dat file here: 6:< SLOG $18d7e026 2017-03-09 13:31:53.756 .STC:Save:Relinquish:LockUsers RW locked This file remained locked for about 4 minutes before the network connection was lost. That means that even if the network connection had not been lost, this file would have been locked for at least 4 minutes. Every time someone needs to borrow a new element Revit needs to get a lock on users.dat and a few other files. This means that if another user tries to borrow a new element while rvtuser1 is doing a SWC, they may see a spinning wheel for several minutes before the element is able to be borrowed. "

Page 33: BLD125158 Code Blue, Dr. Revit! How to Resuscitate Corrupt ... · • The Revit journals folder (for each version of Revit you have installed) is not an obvious location to check

Page | 33

If all else fails

There will be times after all tries, one cannot fix the issue. So….. If all fails and the backups that are available are too old or corrupt as well, you will need to create a Support case with Autodesk. However, before sending in the case do some prep work to minimize downtime. Autodesk Support will always ask for most of the items listed below.

Gather the items As with any emergency room visit the nurse/doctor needs to gather the facts and test results to perform any recovery for the patient. In Revit’s case end user/client model recovery or Autodesk Revit troubleshooting, there are some basic files needed to begin the diagnosis process.

• Last 3-5 Journal files for the user. http://autode.sk/2vHGzBK

• Corrupt Revit project file

• Latest 3 backups for a non-workshared file

• Revit central file_backup folder. This contains the SLOG file as well.

• Revit Local files from the user(s).

• You may also need the local file_backup folder

• All Revit/IFC Linked files, especially when troubleshooting performance issues, or weird anomalies in the software.

• Any critical linked CAD DWG files

• MSINFO file. How to obtain System information file for diagnostics and troubleshooting. http://autode.sk/2w0A1j3

Minimizing File Corruption with Diet and Exercise

As proper diet and exercise are healthy for the human body, Revit, being a complex "animal", also needs a similar regimen. The process of maintaining a healthy model relies on these major concepts. We have covered this a few times at the beginning of the document, however, it still needs to be repeated.

• Computer Maintenance

• Model Maintenance

• Prevention

• Being proactive

Computer Maintenance:

• Apply latest updates to all team members simultaneously

• Keep the video card driver relatively updated

• Monitor Hard disk space ensuring there is at least 5GB available

• Empty the %TEMP% folder regularly

Page 34: BLD125158 Code Blue, Dr. Revit! How to Resuscitate Corrupt ... · • The Revit journals folder (for each version of Revit you have installed) is not an obvious location to check

Page | 34

Model file maintenance

• Increase the number of backups

• Audit the project and linked files periodically. At least once a week

• Selective Purge

• Compact

• New locals. "A local file a day, keeps support away." – Harlan Brumm, 2009

• New Central's occasionally

• Review Warnings and keep them to a minimum.

Prevention

• Vet the families from other sources, manufactures, consultants.

• Periodically check your model for corrupt families. http://autode.sk/2i6ovOu

• CAD files o Avoid Importing CAD o Avoid importing CAD and Explode CAD in project or families. Always use an

interim file to convert CAD linework into Revit lines. In a new project or family Import the CAD, Explode and then remap the lines, patterns to match your company standards or OTB types and styles. Copy the cleaned up version into your actual project or family.

o Link CAD files. It is advisable that CAD file should be cleaned up (especially civil files), purged, audited, PROXYGRAPHICS set to 1.

o Unload/remove unneeded CAD files. CAD files add a considerable bloat to Revit. IF CAD files are visible in the view, the view navigation performance is affected.

o Avoid CAD objects in families.

• Avoid using Undo command after sync with central, or canceling a sync process. This leaves the model in an inconsistent state.

Being Proactive

• Proactively monitor Journals and SLOG files o Some larger companies are investing in scripts and routines to proactively

monitor user Journals and identify issues, crashes, etc. o If your company does not use a managed software system, review SLOG files to

ensure all team members are on the same Revit build. o A few resources that can help

▪ Revit Analytics with Dynamo http://bit.ly/2ysfUsZ ▪ The Great Dynamo Dig: Mine Your Revit Model with Computation

http://bit.ly/2yspQTv

• Dynamo and the Zen of Data Flow. http://bit.ly/2iO0zfL was presented at AU 2016. There is a unique gem that illustrates Data extraction using Bumblebee and provides examples in dataset for using that data for model health analysis and visualization. Journal Personality

Page 35: BLD125158 Code Blue, Dr. Revit! How to Resuscitate Corrupt ... · • The Revit journals folder (for each version of Revit you have installed) is not an obvious location to check

Page | 35

Journal Personality

Some of the entries in the Journal files are amusing. Here are some that the developers must be having a long day and decided to pass on messages to the QA team.

Import Symbols with no Instances

DBG_INFO: ImportSymbol with no instances. This is just sad.:

Make sure to selectively PURGE your file to remove this error

' 2:< DBG_INFO: Insane number of picks in the element # 2244269 of category 'Mass '. Please, file a bug against the category owner.: line 1996 of Picker\GPicker.cpp.

' 8:< DBG_WARN: A CDocument is in an unexpected state, maybe being destroyed according to Jack *OR* see how to use VisitorAllowNullDocument if intent is to skip or process storages in the state with no existing Document, rather than flagging this error: line 79 of Project\DocumentStorageVisitor.cpp. ' 6:< The following untracked moribund element(s) were discovered when this document was loaded, and still have not been deleted: 3258712 - ElementGroup, 3258714 - ElementGroup, 3258716 - ElementGroup, 3258718 - ElementGroup, 3258720 - ElementGroup. Robert, 16-Apr-2009 ' 5:< DBG_INFO: Insane number of picks in the element # 2194103 of category 'Furniture '. Please, file a bug against the category owner.: line 1996 of Picker\GPicker.cpp. ' 0:< MODIFICATION IS FORBIDDEN: Element modification is forbidden because it is an element in group unplaced world. '12:< Snapshot is constant '12:< Snapshot is constant and really did nothing ' 4:< DBG_INFO: Different numbers of Geometries for old and new snapshots.: line 3616 of d:\r2\2017_px64\source\revit\revitdb\regen\GeomStepList.cpp. ' 4:< DBG_INFO: setSnapshotGeomChangeInfo failed. Please look at previous journal entries and file a bug.: line 3769 of d:\r2\2017_px64\source\revit\revitdb\regen\GeomStepList.cpp. 5:< ImportFileVersion: DBX[37] ' 0.170441 5:<<reloadLinkedInstances [17/M:\Private\Open Projects\Campus #5\Ramp\Drawings-Specs\Preconstruction\LUTRON C5RAMP\One Lines\LUTRON C5RAMP ONE LINE PHASE 2-3 10-25-16.dwg] ' 5:< ImportFileVersion: DBX[27] ' 5:< DBG_INFO: Non-zero external translation detected. How extremely interesting.: line 726 of Source\ImporterDBX.cpp.

Page 36: BLD125158 Code Blue, Dr. Revit! How to Resuscitate Corrupt ... · • The Revit journals folder (for each version of Revit you have installed) is not an obvious location to check

Page | 36

Special Thanks:

Greg Wesner with Panzura for providing great insights regarding the slog file and how to analyze them.

Autodesk Expert Elite program, Directly, & Autodesk Customers. Matt and I participated in the beta launch of Autodesk Tech support tickets being handled by Experts in the field. This initiative routed tickets to Directly where questions were answered by the Expert Elites. This gave us the opportunity to dive in to the models, Journal files, slog file to be able to solve some challenging questions.

James at SQP for letting us use his model for the demo

Brandon Wlosinski at BNIM for letting us use the model for demoing corrupt families.

Judy Staicer with Autodesk Technical Support for providing us excellent pointers in understanding Journal files.

Revit Clinic and Harlan Brumm for their articles on Journal files and Slog files

Jacob Westergaard with Autodesk Technical Support for helping us understand the mystery about Too Many Elements Missing error.

Page 37: BLD125158 Code Blue, Dr. Revit! How to Resuscitate Corrupt ... · • The Revit journals folder (for each version of Revit you have installed) is not an obvious location to check

Page | 37

References

Journal file story. http://revitclinic.typepad.com/my_weblog/2009/03/a-journal-file-story-part-1.html

Synchronize With Central Troubleshooting, http://revitclinic.typepad.com/my_weblog/2010/03/synchronize-with-central-troubleshooting.html

Worksharing Log File Tips, http://revitclinic.typepad.com/my_weblog/2010/05/worksharing-log-file-tips.html

How to read the journal file (Revit), https://knowledge.autodesk.com/support/revit-products/troubleshooting/caas/sfdcarticles/sfdcarticles/How-to-read-the-journal-file-Revit.html

Autodesk Knowledge Network Autodesk Community forums Additions ' 8:< DBG_INFO: RvtLinkInstance::createProxyDBView resets level of plan view: line 3420 of Elem\RvtLinkInstance.cpp. This indicated that the levels between links are not coordinated and there are slight height differences of levels named the same. ' 8:< DBG_WARN: Missing ESSchema: GUID be3776f0-b3e2-4919-967e-90d64b890497: line 1398 of Archive\DataDict.cpp. ' 8:< An ArchiveException 105 is raised at line 1399 of Archive\DataDict.cpp: Missing ESSchema: GUID be3776f0-b3e2-4919-967e-90d64b890497 'C 31-Oct-2017 16:05:00.063; 8:< Assertion failed: line 386 of ElemTable\Unmarshaller.cpp ' Audit and purge and compact 2x the Revit file E:\NKMData\Data\AU 2017 Proposals\Class Documents\Too Many Elements Missing 679451.txt ' 0:< Candidates (curIdx = 0): 679451 ( this is the Element ID of selections) (+4.464100, +23.621018, +0.124672) 671557 (is this ID TOO?) (+4.464100, +23.937129, +0.000000) 671557-2147483647-LINE (+4.464100, +23.937129, +0.000000) , "[FH2702.rvt]", "Detail View: $Edit Panel$ - Assembly 013" _ , 20524.90793436679451 _ , 20524.90793436679451, 0.00000000000000, 0.00000000000000 _ , 0.00000000000000, 20524.90793436679451, 0.00000000000000 _ , 0.00000000000000, 0.00000000000000, 20524.90793436679451 _ , 908.90277577388713, -6901.97864670984836, 0.00000000000000

Page 38: BLD125158 Code Blue, Dr. Revit! How to Resuscitate Corrupt ... · • The Revit journals folder (for each version of Revit you have installed) is not an obvious location to check

Page | 38

Are these the Element IDs? Since the number matches and right after the command 71387: $9a95712e 2018-01-15 11:41:59.714 >STC 71469: $9a95712e 2018-01-15 11:42:06.858 <STC This looks like a successful Sync 74515: $3005465d 2018-01-15 11:51:54.754 .LockUsers R gaveUp 75579: $3005465d 2018-01-15 11:55:35.021 >STC 75741: $9a95712e 2018-01-15 11:55:58.620 .LockUsers R gaveUp 75767: $3005465d 2018-01-15 11:56:05.554 <STC 75985: $611c3ba9 2018-01-15 11:56:51.339 >STC 76181: $611c3ba9 2018-01-15 11:57:20.999 <STC 76561: $611c3ba9 2018-01-15 11:58:41.190 >STC