Hi, I want to run dynamo description.
And when the description have input value user have to input, I want to show window and to allow users to enter values like Dynamo player.
I success to get nodes that ‘IsInput = true’, but there are too many different types of nodes to classify (DoubleSlider, FileName, SelectElement… etc.).
string path = @".dyn path";
IDictionary<string, string> journalData = new Dictionary<string, string>
{
{ Dynamo.Applications.JournalKeys.ShowUiKey, false.ToString() }, // don't show DynamoUI at runtime
{ Dynamo.Applications.JournalKeys.AutomationModeKey, true.ToString() }, //run journal automatically
{ Dynamo.Applications.JournalKeys.DynPathKey, "" }, //run node at this file path
{ Dynamo.Applications.JournalKeys.DynPathExecuteKey, true.ToString() }, // The journal file can specify if the Dynamo workspace opened from DynPathKey will be executed or not. If we are in automation mode the workspace will be executed regardless of this key.
{ Dynamo.Applications.JournalKeys.ForceManualRunKey, false.ToString() }, // don't run in manual mode
{ Dynamo.Applications.JournalKeys.ModelShutDownKey, true.ToString() },
{ Dynamo.Applications.JournalKeys.ModelNodesInfo, false.ToString() }
};
DynamoRevitCommandData dynamoRevitCommandData = new DynamoRevitCommandData();
dynamoRevitCommandData.Application = uiApp;
dynamoRevitCommandData.JournalData = journalData;
DynamoRevit dynamoRevit = new DynamoRevit();
Result externalCommandResult = dynamoRevit.ExecuteCommand(dynamoRevitCommandData);
DynamoRevit.RevitDynamoModel.OpenFileFromPath(path, true);
List<NodeModel> nodeModels = DynamoRevit.RevitDynamoModel.CurrentWorkspace.Nodes.ToList();
List<NodeModel> isInputNodes = new List<NodeModel>();
List<NodeModel> isOutputNodes = new List<NodeModel>();
foreach (NodeModel node in nodeModels)
{
if (node.IsSetAsInput) isInputNodes.Add(node);
if (node.IsSetAsOutput) isOutputNodes.Add(node);
}
I want to classihy node’s type of ‘isInputNodes’
How can I do this?