Is there a way to run Dynamo using only the json data of the Dynamo file rather than the Dynamo file path?
By using only the JObject in the code
public Result Execute(ExternalCommandData commandData,ref string message,ElementSet elements)
{
string dynamoJsonContent = File.ReadAllText(exDyanmofilepath);
JObject dynamoJsonObject = JObject.Parse(dynamoJsonContent );
journalData = new Dictionary<string, string>
{
{ JournalKeys.ShowUiKey, false.ToString() },
{ JournalKeys.AutomationModeKey, true.ToString() },
{ JournalKeys.DynPathKey, exDynamofilepath},
{ JournalKeys.ForceManualRunKey, true.ToString() },
{ JournalKeys.ModelShutDownKey, true.ToString() },
};
DynamoRevitCommandData dynamoRevitCommandData = new DynamoRevitCommandData
{
Application = commandData.Application,
JournalData = journalData
};
dynamoRevit.ExecuteCommand(dynamoRevitCommandData);
DynamoRevit.RevitDynamoModel.ForceRun();
}