Graph Preview States For New Node#12908
Conversation
| previewGraphData = engineController.PreviewGraphSyncData(modifiedNodes,verboseLogging); | ||
| TargetedWorkspace = workspace; | ||
| modifiedNodes = ComputeModifiedNodes(workspace); | ||
| previewGraphData = engineController.PreviewGraphSyncData(modifiedNodes, verboseLogging); |
There was a problem hiding this comment.
@aparajit-pratap @mjkkirschner @sm6srw @pinzart90 I have a question, if a graph(in manual mode) has been run once, then the user add a new node, what should this function return? I would expect this function to return me the new node's node id, but it is currently returning an empty set and causing a bug.
There was a problem hiding this comment.
was PreviewGraphSyncData returning empty list before your change to ComputeModifiedNodes? To clarify - which function were you referring to?
There was a problem hiding this comment.
@mjkkirschner Previously the function PreviewGraphSyncData is also returning empty. modifiedNodes were always all of the nodes in workspace so I would not trust the return value at all. As you can see from the comment from Ben, that TODO from 7 years ago never finished. Right now I am setting the modified nodes as an example, and in my case, I am adding a new node to the existing workspace, but this function does not return the expected results.
There was a problem hiding this comment.
Since the description of the PreviewGraphSyncData function is This is called on the main thread from PreviewGraphSyncData to generate the list of node id's that will be executed on the next run. I would expect it to return the id of newly added node.
There was a problem hiding this comment.
Thanks to Turbo Team who fixed this API, this is now working
Please Note:
DynamoRevitrepo will need to be cherry-picked into all the DynamoRevit Release branches that Dynamo supports. Contributors will be responsible for cherry-picking their reviewed commits to the other branches after aLGTMlabel is added to the PR.Purpose
Per https://jira.autodesk.com/browse/DYN-4357, enable Graph Preview States for new node

Declarations
Check these if you believe they are true
*.resxfilesRelease Notes
enable Graph Preview States for new node
Reviewers
@DynamoDS/dynamo
FYIs
(FILL ME IN, Optional) Names of anyone else you wish to be notified of