Skip to content

REVIT-223867 : reinstate splashscreen #3140

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: Revit2026
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions src/DynamoRevit/DynamoRevit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ public class DynamoRevit : IExternalCommand
private static List<Exception> preLoadExceptions;
private static Action shutdownHandler;
private Stopwatch startupTimer;
private Dynamo.UI.Views.SplashScreen splashScreen;
private static Dynamo.UI.Views.SplashScreen splashScreen;

/// <summary>
/// Get or Set the current RevitDynamoModel available in Revit context
Expand All @@ -226,6 +226,11 @@ public class DynamoRevit : IExternalCommand
/// </summary>
public static DynamoViewModel RevitDynamoViewModel { get; private set; }

/// <summary>
/// Determines whether the splash screen is currently visible.
/// </summary>
public static bool IsSplashScreenVisible() => splashScreen != null && splashScreen.IsVisible;

static DynamoRevit()
{
idleActions = new List<Action>();
Expand Down Expand Up @@ -289,8 +294,7 @@ public Result ExecuteCommand(DynamoRevitCommandData commandData)
try
{
// Launch main Dynamo directly when ShowUiKey is true.
bool bSkipSplashScreen = true; // TODO: remove this when issue with System.Windows.Application.Current not being null
if (CheckJournalForKey(commandData, JournalKeys.ShowUiKey, false) || bSkipSplashScreen)
if (CheckJournalForKey(commandData, JournalKeys.ShowUiKey, false))
{
extCommandData = commandData;
LoadDynamoWithoutSplashScreen();
Expand Down Expand Up @@ -1082,6 +1086,8 @@ private static void OnSplashScreenClosed(object sender, EventArgs e)
//the model is shutdown when splash screen is closed
RevitDynamoModel.State = DynamoModel.DynamoModelState.NotStarted;
}

splashScreen = null;
}

#endregion
Expand Down