DYN-9032 - add debug for dumping node icons#16293
Conversation
There was a problem hiding this comment.
See the ticket for this pull request: https://jira.autodesk.com/browse/DYN-9032
There was a problem hiding this comment.
Pull Request Overview
Adds a new debug command to export all node icons from the workspace for troubleshooting.
- Introduces a "Dump Node Icons" menu item under the Debug menu in the main view.
- Registers a new
DumpNodeIconsCommandand implementsDumpNodeIconDatato iterate through visible nodes and capture their icons. - Adds corresponding resource entries for the menu label in both default and en-US
.resxfiles.
Reviewed Changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/DynamoCoreWpf/Views/Core/DynamoView.xaml | Added menu item bound to DumpNodeIconsCommand. |
| src/DynamoCoreWpf/ViewModels/Core/DynamoViewModelDelegateCommands.cs | Registered DumpNodeIconsCommand in initialization and as a public property. |
| src/DynamoCoreWpf/ViewModels/Core/DynamoViewModel.cs | Implemented DumpNodeIconData method to place nodes, inspect their icons, and (intended) record results. |
| src/DynamoCoreWpf/Properties/Resources.resx | Defined localized string for the new menu entry. |
| src/DynamoCoreWpf/Properties/Resources.en-US.resx | Added en-US translation for the new menu entry. |
Files not reviewed (1)
- src/DynamoCoreWpf/Properties/Resources.Designer.cs: Language not supported
Comments suppressed due to low confidence (2)
src/DynamoCoreWpf/ViewModels/Core/DynamoViewModelDelegateCommands.cs:96
- [nitpick] The method name
DumpNodeIconData(singular) is inconsistent with the command nameDumpNodeIconsCommand(plural). Consider renaming for consistency, e.g.DumpNodeIconsData.
DumpNodeIconsCommand = new DelegateCommand(DumpNodeIconData, CanDumpNodeHelpData);
src/DynamoCoreWpf/ViewModels/Core/DynamoViewModel.cs:4305
- [nitpick] There are no accompanying unit tests for the new DumpNodeIconData logic. Adding tests would help ensure correct output formatting and command availability.
internal void DumpNodeIconData(object parameter)
QilongTang
left a comment
There was a problem hiding this comment.
LGTM, I guess the nodes list can be exported from graph node manager?
For now, it writes a csv to the logs folder |
|
revised to include assembly in the export as well |
Oh missed that, with that, would you attach the |
| internal void DumpNodeIconData(object parameter) | ||
| { | ||
| //set to manual run mode | ||
| this.HomeSpace.RunSettings.RunType = RunType.Manual; |
There was a problem hiding this comment.
For manual run mode? Because I’m placing real nodes to get their view model which reports the icon source. Node model and node search element don’t report icon source. And placing real nodes causes hangups if on run automatic because of default values.
There was a problem hiding this comment.
Did I understand this correctly - you're placing nodes in the canvas that don't have icons to identify them so icons can be added for them?
There was a problem hiding this comment.
To my knowledge, one of the easiest ways to find if a node has an icon is to get its view model and get ‘IconSource’, so I’m placing the nodes on the canvas to get that and it also serves as a way for the end user to see the nodes themselves.
This is all for a tool to help identify nodes with missing icons.

Purpose
Adds a new debug command to export all node icons from the workspace for troubleshooting.
Declarations
Check these if you believe they are true
*.resxfilesRelease Notes
N/A
Reviewers
@QilongTang
FYIs
@DynamoDS/eidos