diff --git a/src/DynamoCore/Models/DynamoModel.cs b/src/DynamoCore/Models/DynamoModel.cs
index 21fbbcb6c83..6a86e847bdf 100644
--- a/src/DynamoCore/Models/DynamoModel.cs
+++ b/src/DynamoCore/Models/DynamoModel.cs
@@ -2256,7 +2256,7 @@ internal void OpenFileFromPathCore(string filePath, bool forceManualExecutionMod
// When Json opening failed, either this file is corrupted or file might be XML
if (ex is JsonReaderException && DynamoUtilities.PathHelper.isValidXML(filePathToOpen, out xmlDoc, out ex))
{
- openedSuccessfully = OpenXmlFileFromPath(xmlDoc, filePathToOpen, forceManualExecutionMode);
+ openedSuccessfully = OpenXmlFileFromPath(xmlDoc, filePathToOpen, forceManualExecutionMode, forceBlockRun: forceBlockRun);
return;
}
else
@@ -2465,8 +2465,9 @@ private void InsertJsonFileFromPath(string fileContents, string filePath, bool f
/// Set this to true to discard
/// execution mode specified in the file and set manual mode
/// When true, marks the opened workspace as a template (for example when opened via ).
+ /// Set this to true to block the graph from running after opening.
/// True if workspace was opened successfully
- private bool OpenXmlFileFromPath(XmlDocument xmlDoc, string filePath, bool forceManualExecutionMode, bool isTemplate = false)
+ private bool OpenXmlFileFromPath(XmlDocument xmlDoc, string filePath, bool forceManualExecutionMode, bool isTemplate = false, bool forceBlockRun = false)
{
try
{
@@ -2491,6 +2492,8 @@ private bool OpenXmlFileFromPath(XmlDocument xmlDoc, string filePath, bool force
if (OpenXmlFile(workspaceInfo, xmlDoc, out ws))
{
ws.IsTemplate = isTemplate;
+ if (ws is HomeWorkspaceModel homeWs && homeWs.RunSettings != null)
+ homeWs.RunSettings.ForceBlockRun = forceBlockRun;
OpenWorkspace(ws);
// Set up workspace cameras here