Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have an addin that has been working fine for years until we updated to Windows 11, now when I try to import a family symbol that needs to be upgraded using the application Revit gets stuck and does not accept any input. This doesn't happen every time but once Revit locks up the only way to fix it is to close Revit and reopen it. The function below is simplified from our addin, but I can replicate the issue with it.
public static void LoadARFamily(ExternalCommandData CommandData, string path, string famName, string symbName)
{
Document doc = CommandData.Application.ActiveUIDocument.Document;
FamilySymbol res;
try
{
using (Transaction transaction = new Transaction(doc, "Load Family Symbol"))
{
transaction.Start("Load Family Symbol");
// Check if already loaded first
FilteredElementCollector collector = new FilteredElementCollector(doc)
.OfClass(typeof(FamilySymbol));
res = collector
.Cast<FamilySymbol>()
.FirstOrDefault(s => s.FamilyName == famName.Replace(".rfa", "") &&
s.Name == symbName);
if(res == null)
{
// not yet loaded, so load it now
if (!doc.LoadFamilySymbol(Path.Combine(path, famName), symbName, out res))
{
TaskDialog.Show("Revit - 1", "Could not load family symbol: " + symbName + " from family: " + famName + "\nUsingPath: " + Path.Combine(path, famName));
transaction.RollBack();
return;
}
}
if (res != null && !res.IsActive)
{
res.Activate();
}
transaction.Commit();
}
}
catch (Exception ex)
{
TaskDialog.Show("Revit - 2", "Could not load family symbol: " + symbName + " from family: " + famName + "\nUsingPath: " + Path.Combine(path, famName) + "\n" + ex.ToString());
}
finally
{
}
}
Some notes from my troubleshooting:
- I can only seem to recreate the issue on a computer running Windows 11, but the issue seems to affect every version of Revit that we use (2023-2025)
- Revit does not lock up every time the function is run, but if I run the function enough (select enough family symbols to import using the addin) Revit will eventually lock up.
- When I debug in Visual Studio and attach my debug session to Revit no errors are thrown and all breakpoints are passed successfully. Revit seems to be locking up when control is handed back after the import is complete.
- I am using Revit's templates as the file I import the family symbols into.
- The lockup seems to happen only when the family symbol needs to be upgraded from an earlier version of Revit before insertion (e.g. 2022 -> 2023)
- I have attached a family file that can be used to recreate the issue.
Has anyone encountered this? Is it something weird our addin is doing/not doing, is there something in the family that is causing issues, or is there some new incompatibility in Windows 11?
Thanks in advance!
Solved! Go to Solution.