From 016d38351319753f48a1bbd0c816ddfa56515066 Mon Sep 17 00:00:00 2001 From: john pierson Date: Wed, 11 Jun 2025 13:31:34 -0600 Subject: [PATCH 01/12] Add debug mode --- .../Properties/Resources.Designer.cs | 27 +++++++------------ .../Properties/Resources.en-US.resx | 3 +++ src/DynamoCoreWpf/Properties/Resources.resx | 6 ++++- .../ViewModels/Core/DynamoViewModel.cs | 26 ++++++++++++++++++ .../Core/DynamoViewModelDelegateCommands.cs | 2 ++ src/DynamoCoreWpf/Views/Core/DynamoView.xaml | 3 +++ 6 files changed, 48 insertions(+), 19 deletions(-) diff --git a/src/DynamoCoreWpf/Properties/Resources.Designer.cs b/src/DynamoCoreWpf/Properties/Resources.Designer.cs index 0aca110c3d5..1ffa8f03310 100644 --- a/src/DynamoCoreWpf/Properties/Resources.Designer.cs +++ b/src/DynamoCoreWpf/Properties/Resources.Designer.cs @@ -1495,6 +1495,15 @@ public static string DynamoViewDebugMenuDumpNodeHelpData { } } + /// + /// Looks up a localized string similar to _Dump Node Icons. + /// + public static string DynamoViewDebugMenuDumpNodeIcons { + get { + return ResourceManager.GetString("DynamoViewDebugMenuDumpNodeIcons", resourceCulture); + } + } + /// /// Looks up a localized string similar to _Force Re-execute. /// @@ -8027,24 +8036,6 @@ public static string PreferencesViewEnableNodeAutoComplete { } } - /// - /// Looks up a localized string similar to Enable New UI. - /// - public static string PreferencesViewEnableNodeAutoCompleteNewUI { - get { - return ResourceManager.GetString("PreferencesViewEnableNodeAutoCompleteNewUI", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Enable the new floating menu for node suggestions for a more streamlined workflow. Turn off to return to the traditional pop-up dialog.. - /// - public static string PreferencesViewEnableNodeAutoCompleteNewUITooltipText { - get { - return ResourceManager.GetString("PreferencesViewEnableNodeAutoCompleteNewUITooltipText", resourceCulture); - } - } - /// /// Looks up a localized string similar to Learn more about Node Autocomplete feature.. /// diff --git a/src/DynamoCoreWpf/Properties/Resources.en-US.resx b/src/DynamoCoreWpf/Properties/Resources.en-US.resx index ad8cce97447..6c0a8b83fca 100644 --- a/src/DynamoCoreWpf/Properties/Resources.en-US.resx +++ b/src/DynamoCoreWpf/Properties/Resources.en-US.resx @@ -4161,5 +4161,8 @@ To make this file into a new template, save it to a different folder, then move Enable the new floating menu for node suggestions for a more streamlined workflow. Turn off to return to the traditional pop-up dialog. + + _Dump Node Icons + Debug menu | Dump all node icons \ No newline at end of file diff --git a/src/DynamoCoreWpf/Properties/Resources.resx b/src/DynamoCoreWpf/Properties/Resources.resx index dd537f95850..5a1e6fc2733 100644 --- a/src/DynamoCoreWpf/Properties/Resources.resx +++ b/src/DynamoCoreWpf/Properties/Resources.resx @@ -4146,4 +4146,8 @@ To make this file into a new template, save it to a different folder, then move This group is frozen. Click to unfreeze. - + + _Dump Node Icons + Debug menu | Dump all node icons + + \ No newline at end of file diff --git a/src/DynamoCoreWpf/ViewModels/Core/DynamoViewModel.cs b/src/DynamoCoreWpf/ViewModels/Core/DynamoViewModel.cs index edebded999d..f11e39abd71 100644 --- a/src/DynamoCoreWpf/ViewModels/Core/DynamoViewModel.cs +++ b/src/DynamoCoreWpf/ViewModels/Core/DynamoViewModel.cs @@ -4302,6 +4302,32 @@ internal void DumpNodeHelpData(object parameter) File.WriteAllText(fullFileName, stat.ToString()); } + internal void DumpNodeIconData(object parameter) + { + var stat = new System.Text.StringBuilder(); + //creating a copy to avoid collection changed exceptions + var entriesCopy = Model.SearchModel.Entries.Where(n => n.IsVisibleInSearch).ToList(); + + foreach (var nse in entriesCopy) + { + var newNode = nse.CreateNode(); + this.CurrentSpace.AddAndRegisterNode(newNode); + var placedNode = this.CurrentSpaceViewModel.Nodes.Last(); + var imageSource = placedNode.ImageSource; + + //if image source is null, then no icon is found + if (imageSource is null) + { + stat.AppendLine($"{nse.Name},"); + stat.AppendLine(Environment.NewLine); + } + else + { + this.CurrentSpaceViewModel.DynamoViewModel.DeleteCommand.Execute(placedNode); + } + } + } + private FileInfo GetMatchingDocFromDirectory(string nodeName, string hash, List suffix, DirectoryInfo dir) { FileInfo matchingFile = null; diff --git a/src/DynamoCoreWpf/ViewModels/Core/DynamoViewModelDelegateCommands.cs b/src/DynamoCoreWpf/ViewModels/Core/DynamoViewModelDelegateCommands.cs index 9469d13eb63..5d499ebb28e 100644 --- a/src/DynamoCoreWpf/ViewModels/Core/DynamoViewModelDelegateCommands.cs +++ b/src/DynamoCoreWpf/ViewModels/Core/DynamoViewModelDelegateCommands.cs @@ -93,6 +93,7 @@ private void InitializeDelegateCommands() ShowAboutWindowCommand = new DelegateCommand(ShowAboutWindow, CanShowAboutWindow); SetNumberFormatCommand = new DelegateCommand(SetNumberFormat, CanSetNumberFormat); DumpNodeHelpDataCommand = new DelegateCommand(DumpNodeHelpData, CanDumpNodeHelpData); + DumpNodeIconsCommand = new DelegateCommand(DumpNodeIconData, CanDumpNodeHelpData); DumpLibraryToXmlCommand = new DelegateCommand(model.DumpLibraryToXml, model.CanDumpLibraryToXml); ShowNewPresetsDialogCommand = new DelegateCommand(ShowNewPresetStateDialogAndMakePreset, CanShowNewPresetStateDialog); NodeFromSelectionCommand = new DelegateCommand(CreateNodeFromSelection, CanCreateNodeFromSelection); @@ -182,6 +183,7 @@ private void InitializeDelegateCommands() public DelegateCommand CheckForLatestRenderCommand { get; set; } public DelegateCommand DumpLibraryToXmlCommand { get; set; } public DelegateCommand DumpNodeHelpDataCommand { get; set; } + public DelegateCommand DumpNodeIconsCommand { get; set; } public DelegateCommand ShowNewPresetsDialogCommand { get; set; } public DelegateCommand NodeFromSelectionCommand { get; set; } public DelegateCommand OpenDocumentationLinkCommand { get; set; } diff --git a/src/DynamoCoreWpf/Views/Core/DynamoView.xaml b/src/DynamoCoreWpf/Views/Core/DynamoView.xaml index cbf54ad68ad..4585fc266a6 100644 --- a/src/DynamoCoreWpf/Views/Core/DynamoView.xaml +++ b/src/DynamoCoreWpf/Views/Core/DynamoView.xaml @@ -687,6 +687,9 @@ + Date: Wed, 11 Jun 2025 13:34:59 -0600 Subject: [PATCH 02/12] Update Resources.en-US.resx --- src/DynamoCoreWpf/Properties/Resources.en-US.resx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/DynamoCoreWpf/Properties/Resources.en-US.resx b/src/DynamoCoreWpf/Properties/Resources.en-US.resx index 6c0a8b83fca..6a84955207f 100644 --- a/src/DynamoCoreWpf/Properties/Resources.en-US.resx +++ b/src/DynamoCoreWpf/Properties/Resources.en-US.resx @@ -4161,8 +4161,9 @@ To make this file into a new template, save it to a different folder, then move Enable the new floating menu for node suggestions for a more streamlined workflow. Turn off to return to the traditional pop-up dialog. + _Dump Node Icons Debug menu | Dump all node icons - \ No newline at end of file + From d359738096bfdd10171d151694f8fe6b5afc0d2c Mon Sep 17 00:00:00 2001 From: john pierson Date: Wed, 11 Jun 2025 13:39:44 -0600 Subject: [PATCH 03/12] fix resources --- .../Properties/Resources.Designer.cs | 27 ++++++++++++------- .../Properties/Resources.en-US.resx | 6 +---- src/DynamoCoreWpf/Properties/Resources.resx | 6 +---- 3 files changed, 20 insertions(+), 19 deletions(-) diff --git a/src/DynamoCoreWpf/Properties/Resources.Designer.cs b/src/DynamoCoreWpf/Properties/Resources.Designer.cs index 1ffa8f03310..0aca110c3d5 100644 --- a/src/DynamoCoreWpf/Properties/Resources.Designer.cs +++ b/src/DynamoCoreWpf/Properties/Resources.Designer.cs @@ -1495,15 +1495,6 @@ public static string DynamoViewDebugMenuDumpNodeHelpData { } } - /// - /// Looks up a localized string similar to _Dump Node Icons. - /// - public static string DynamoViewDebugMenuDumpNodeIcons { - get { - return ResourceManager.GetString("DynamoViewDebugMenuDumpNodeIcons", resourceCulture); - } - } - /// /// Looks up a localized string similar to _Force Re-execute. /// @@ -8036,6 +8027,24 @@ public static string PreferencesViewEnableNodeAutoComplete { } } + /// + /// Looks up a localized string similar to Enable New UI. + /// + public static string PreferencesViewEnableNodeAutoCompleteNewUI { + get { + return ResourceManager.GetString("PreferencesViewEnableNodeAutoCompleteNewUI", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Enable the new floating menu for node suggestions for a more streamlined workflow. Turn off to return to the traditional pop-up dialog.. + /// + public static string PreferencesViewEnableNodeAutoCompleteNewUITooltipText { + get { + return ResourceManager.GetString("PreferencesViewEnableNodeAutoCompleteNewUITooltipText", resourceCulture); + } + } + /// /// Looks up a localized string similar to Learn more about Node Autocomplete feature.. /// diff --git a/src/DynamoCoreWpf/Properties/Resources.en-US.resx b/src/DynamoCoreWpf/Properties/Resources.en-US.resx index 6a84955207f..ad8cce97447 100644 --- a/src/DynamoCoreWpf/Properties/Resources.en-US.resx +++ b/src/DynamoCoreWpf/Properties/Resources.en-US.resx @@ -4162,8 +4162,4 @@ To make this file into a new template, save it to a different folder, then move Enable the new floating menu for node suggestions for a more streamlined workflow. Turn off to return to the traditional pop-up dialog. - - _Dump Node Icons - Debug menu | Dump all node icons - - + \ No newline at end of file diff --git a/src/DynamoCoreWpf/Properties/Resources.resx b/src/DynamoCoreWpf/Properties/Resources.resx index 5a1e6fc2733..dd537f95850 100644 --- a/src/DynamoCoreWpf/Properties/Resources.resx +++ b/src/DynamoCoreWpf/Properties/Resources.resx @@ -4146,8 +4146,4 @@ To make this file into a new template, save it to a different folder, then move This group is frozen. Click to unfreeze. - - _Dump Node Icons - Debug menu | Dump all node icons - - \ No newline at end of file + From aa2508aa49ad25c4f4994b0f784614d3b0caa693 Mon Sep 17 00:00:00 2001 From: john pierson Date: Wed, 11 Jun 2025 13:42:03 -0600 Subject: [PATCH 04/12] Add resources --- src/DynamoCoreWpf/Properties/Resources.Designer.cs | 9 +++++++++ src/DynamoCoreWpf/Properties/Resources.en-US.resx | 4 ++++ src/DynamoCoreWpf/Properties/Resources.resx | 4 ++++ 3 files changed, 17 insertions(+) diff --git a/src/DynamoCoreWpf/Properties/Resources.Designer.cs b/src/DynamoCoreWpf/Properties/Resources.Designer.cs index 0aca110c3d5..d96dc465697 100644 --- a/src/DynamoCoreWpf/Properties/Resources.Designer.cs +++ b/src/DynamoCoreWpf/Properties/Resources.Designer.cs @@ -1495,6 +1495,15 @@ public static string DynamoViewDebugMenuDumpNodeHelpData { } } + /// + /// Looks up a localized string similar to _Dump Node Icons. + /// + public static string DynamoViewDebugMenuDumpNodeIcons { + get { + return ResourceManager.GetString("DynamoViewDebugMenuDumpNodeIcons", resourceCulture); + } + } + /// /// Looks up a localized string similar to _Force Re-execute. /// diff --git a/src/DynamoCoreWpf/Properties/Resources.en-US.resx b/src/DynamoCoreWpf/Properties/Resources.en-US.resx index ad8cce97447..21a6487c08b 100644 --- a/src/DynamoCoreWpf/Properties/Resources.en-US.resx +++ b/src/DynamoCoreWpf/Properties/Resources.en-US.resx @@ -4162,4 +4162,8 @@ To make this file into a new template, save it to a different folder, then move Enable the new floating menu for node suggestions for a more streamlined workflow. Turn off to return to the traditional pop-up dialog. + + _Dump Node Icons + Debug menu | Dump all node icons + \ No newline at end of file diff --git a/src/DynamoCoreWpf/Properties/Resources.resx b/src/DynamoCoreWpf/Properties/Resources.resx index dd537f95850..9d83da69684 100644 --- a/src/DynamoCoreWpf/Properties/Resources.resx +++ b/src/DynamoCoreWpf/Properties/Resources.resx @@ -4146,4 +4146,8 @@ To make this file into a new template, save it to a different folder, then move This group is frozen. Click to unfreeze. + + _Dump Node Icons + Debug menu | Dump all node icons + From 666e1a2b2ba77c943e1307b73e12d7046c1711d7 Mon Sep 17 00:00:00 2001 From: john pierson Date: Wed, 11 Jun 2025 14:00:43 -0600 Subject: [PATCH 05/12] delete nodes with icons, add to api unshipped --- src/DynamoCoreWpf/PublicAPI.Unshipped.txt | 2 ++ src/DynamoCoreWpf/ViewModels/Core/DynamoViewModel.cs | 11 +++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/DynamoCoreWpf/PublicAPI.Unshipped.txt b/src/DynamoCoreWpf/PublicAPI.Unshipped.txt index 86ca4813204..c6adecec6c3 100644 --- a/src/DynamoCoreWpf/PublicAPI.Unshipped.txt +++ b/src/DynamoCoreWpf/PublicAPI.Unshipped.txt @@ -2023,6 +2023,8 @@ Dynamo.ViewModels.DynamoViewModel.DumpLibraryToXmlCommand.get -> Dynamo.UI.Comma Dynamo.ViewModels.DynamoViewModel.DumpLibraryToXmlCommand.set -> void Dynamo.ViewModels.DynamoViewModel.DumpNodeHelpDataCommand.get -> Dynamo.UI.Commands.DelegateCommand Dynamo.ViewModels.DynamoViewModel.DumpNodeHelpDataCommand.set -> void +Dynamo.ViewModels.DynamoViewModel.DumpNodeIconsCommand.get -> Dynamo.UI.Commands.DelegateCommand +Dynamo.ViewModels.DynamoViewModel.DumpNodeIconsCommand.set -> void Dynamo.ViewModels.DynamoViewModel.DynamoViewModel(Dynamo.ViewModels.DynamoViewModel.StartConfiguration startConfiguration) -> void Dynamo.ViewModels.DynamoViewModel.EditName.get -> string Dynamo.ViewModels.DynamoViewModel.EditName.set -> void diff --git a/src/DynamoCoreWpf/ViewModels/Core/DynamoViewModel.cs b/src/DynamoCoreWpf/ViewModels/Core/DynamoViewModel.cs index f11e39abd71..e8a4021cbcf 100644 --- a/src/DynamoCoreWpf/ViewModels/Core/DynamoViewModel.cs +++ b/src/DynamoCoreWpf/ViewModels/Core/DynamoViewModel.cs @@ -4304,7 +4304,14 @@ internal void DumpNodeHelpData(object parameter) internal void DumpNodeIconData(object parameter) { + //set to manual run mode + this.HomeSpace.RunSettings.RunType = RunType.Manual; + var stat = new System.Text.StringBuilder(); + + string fileName = String.Format("NodesWithoutIcons_{0}.csv", DateTime.Now.ToString("yyyyMMddHmmss")); + string fullFileName = Path.Combine(Model.PathManager.LogDirectory, fileName); + //creating a copy to avoid collection changed exceptions var entriesCopy = Model.SearchModel.Entries.Where(n => n.IsVisibleInSearch).ToList(); @@ -4319,13 +4326,13 @@ internal void DumpNodeIconData(object parameter) if (imageSource is null) { stat.AppendLine($"{nse.Name},"); - stat.AppendLine(Environment.NewLine); } else { - this.CurrentSpaceViewModel.DynamoViewModel.DeleteCommand.Execute(placedNode); + this.Model.ExecuteCommand(new DynamoModel.DeleteModelCommand(placedNode.Id)); } } + File.WriteAllText(fullFileName, stat.ToString()); } private FileInfo GetMatchingDocFromDirectory(string nodeName, string hash, List suffix, DirectoryInfo dir) From f4b03bd9b77981d841833f22aed4cd3186155367 Mon Sep 17 00:00:00 2001 From: john pierson Date: Wed, 11 Jun 2025 14:03:08 -0600 Subject: [PATCH 06/12] Update DynamoViewModelDelegateCommands.cs --- .../ViewModels/Core/DynamoViewModelDelegateCommands.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DynamoCoreWpf/ViewModels/Core/DynamoViewModelDelegateCommands.cs b/src/DynamoCoreWpf/ViewModels/Core/DynamoViewModelDelegateCommands.cs index 5d499ebb28e..ae14486c3dc 100644 --- a/src/DynamoCoreWpf/ViewModels/Core/DynamoViewModelDelegateCommands.cs +++ b/src/DynamoCoreWpf/ViewModels/Core/DynamoViewModelDelegateCommands.cs @@ -93,7 +93,7 @@ private void InitializeDelegateCommands() ShowAboutWindowCommand = new DelegateCommand(ShowAboutWindow, CanShowAboutWindow); SetNumberFormatCommand = new DelegateCommand(SetNumberFormat, CanSetNumberFormat); DumpNodeHelpDataCommand = new DelegateCommand(DumpNodeHelpData, CanDumpNodeHelpData); - DumpNodeIconsCommand = new DelegateCommand(DumpNodeIconData, CanDumpNodeHelpData); + DumpNodeIconsCommand = new DelegateCommand(DumpNodeIconData, CanDumpNodeIconData); DumpLibraryToXmlCommand = new DelegateCommand(model.DumpLibraryToXml, model.CanDumpLibraryToXml); ShowNewPresetsDialogCommand = new DelegateCommand(ShowNewPresetStateDialogAndMakePreset, CanShowNewPresetStateDialog); NodeFromSelectionCommand = new DelegateCommand(CreateNodeFromSelection, CanCreateNodeFromSelection); From 789ec72a85cfa1c856fb01fe29339445fd167f57 Mon Sep 17 00:00:00 2001 From: john pierson Date: Wed, 11 Jun 2025 14:07:54 -0600 Subject: [PATCH 07/12] Update DynamoViewModel.cs --- src/DynamoCoreWpf/ViewModels/Core/DynamoViewModel.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/DynamoCoreWpf/ViewModels/Core/DynamoViewModel.cs b/src/DynamoCoreWpf/ViewModels/Core/DynamoViewModel.cs index e8a4021cbcf..2710f0f7985 100644 --- a/src/DynamoCoreWpf/ViewModels/Core/DynamoViewModel.cs +++ b/src/DynamoCoreWpf/ViewModels/Core/DynamoViewModel.cs @@ -4358,6 +4358,10 @@ internal bool CanDumpNodeHelpData(object obj) { return true; } + internal bool CanDumpNodeIconData(object obj) + { + return true; + } #region Shutdown related methods From 8599b4bb926a94ddf13eef2ed9b2d74f35d3f7fb Mon Sep 17 00:00:00 2001 From: john pierson Date: Wed, 11 Jun 2025 14:29:26 -0600 Subject: [PATCH 08/12] Update PublicAPI.Unshipped.txt --- src/DynamoCoreWpf/PublicAPI.Unshipped.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/src/DynamoCoreWpf/PublicAPI.Unshipped.txt b/src/DynamoCoreWpf/PublicAPI.Unshipped.txt index c6adecec6c3..9c14d09765e 100644 --- a/src/DynamoCoreWpf/PublicAPI.Unshipped.txt +++ b/src/DynamoCoreWpf/PublicAPI.Unshipped.txt @@ -4676,6 +4676,7 @@ static Dynamo.Wpf.Properties.Resources.DynamoViewDebugMenuDebugModes.get -> stri static Dynamo.Wpf.Properties.Resources.DynamoViewDebugMenuDumpData.get -> string static Dynamo.Wpf.Properties.Resources.DynamoViewDebugMenuDumpLibrary.get -> string static Dynamo.Wpf.Properties.Resources.DynamoViewDebugMenuDumpNodeHelpData.get -> string +static Dynamo.Wpf.Properties.Resources.DynamoViewDebugMenuDumpNodeIcons.get -> string static Dynamo.Wpf.Properties.Resources.DynamoViewDebugMenuForceReExecute.get -> string static Dynamo.Wpf.Properties.Resources.DynamoViewDebugMenuForceUpdate.get -> string static Dynamo.Wpf.Properties.Resources.DynamoViewDebugMenuRunMutationTest.get -> string From c8761338792b4f129d039c6ea93e523ff7ee21d1 Mon Sep 17 00:00:00 2001 From: john pierson Date: Wed, 11 Jun 2025 14:32:05 -0600 Subject: [PATCH 09/12] Update DynamoViewModel.cs --- src/DynamoCoreWpf/ViewModels/Core/DynamoViewModel.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DynamoCoreWpf/ViewModels/Core/DynamoViewModel.cs b/src/DynamoCoreWpf/ViewModels/Core/DynamoViewModel.cs index 2710f0f7985..8cd0c10e812 100644 --- a/src/DynamoCoreWpf/ViewModels/Core/DynamoViewModel.cs +++ b/src/DynamoCoreWpf/ViewModels/Core/DynamoViewModel.cs @@ -4325,7 +4325,7 @@ internal void DumpNodeIconData(object parameter) //if image source is null, then no icon is found if (imageSource is null) { - stat.AppendLine($"{nse.Name},"); + stat.AppendLine($"{placedNode.Name},"); } else { From f3b501063f32362ccf22a9dfe45cc2722d27adfa Mon Sep 17 00:00:00 2001 From: john pierson Date: Wed, 11 Jun 2025 14:39:00 -0600 Subject: [PATCH 10/12] Update DynamoViewModel.cs --- src/DynamoCoreWpf/ViewModels/Core/DynamoViewModel.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/DynamoCoreWpf/ViewModels/Core/DynamoViewModel.cs b/src/DynamoCoreWpf/ViewModels/Core/DynamoViewModel.cs index 8cd0c10e812..aa9b5f2cfb1 100644 --- a/src/DynamoCoreWpf/ViewModels/Core/DynamoViewModel.cs +++ b/src/DynamoCoreWpf/ViewModels/Core/DynamoViewModel.cs @@ -4307,14 +4307,14 @@ internal void DumpNodeIconData(object parameter) //set to manual run mode this.HomeSpace.RunSettings.RunType = RunType.Manual; - var stat = new System.Text.StringBuilder(); - string fileName = String.Format("NodesWithoutIcons_{0}.csv", DateTime.Now.ToString("yyyyMMddHmmss")); string fullFileName = Path.Combine(Model.PathManager.LogDirectory, fileName); //creating a copy to avoid collection changed exceptions var entriesCopy = Model.SearchModel.Entries.Where(n => n.IsVisibleInSearch).ToList(); + StreamWriter sw = File.CreateText(fullFileName); + foreach (var nse in entriesCopy) { var newNode = nse.CreateNode(); @@ -4325,14 +4325,14 @@ internal void DumpNodeIconData(object parameter) //if image source is null, then no icon is found if (imageSource is null) { - stat.AppendLine($"{placedNode.Name},"); + sw.WriteLine($"{nse.Assembly},{nse.Name}"); } else { this.Model.ExecuteCommand(new DynamoModel.DeleteModelCommand(placedNode.Id)); } } - File.WriteAllText(fullFileName, stat.ToString()); + sw.Close(); } private FileInfo GetMatchingDocFromDirectory(string nodeName, string hash, List suffix, DirectoryInfo dir) From f68883de2142903273070a1725f9472731565aeb Mon Sep 17 00:00:00 2001 From: john pierson Date: Thu, 12 Jun 2025 09:29:38 -0600 Subject: [PATCH 11/12] =?UTF-8?q?Notify=20user=20with=20toast=20?= =?UTF-8?q?=F0=9F=8D=9E,=20refine=20resources.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/DynamoCoreWpf/Properties/Resources.Designer.cs | 9 +++++++++ src/DynamoCoreWpf/Properties/Resources.en-US.resx | 6 +++++- src/DynamoCoreWpf/Properties/Resources.resx | 6 +++++- .../ViewModels/Core/DynamoViewModel.cs | 14 ++++++++++---- 4 files changed, 29 insertions(+), 6 deletions(-) diff --git a/src/DynamoCoreWpf/Properties/Resources.Designer.cs b/src/DynamoCoreWpf/Properties/Resources.Designer.cs index d96dc465697..1f7a0df772e 100644 --- a/src/DynamoCoreWpf/Properties/Resources.Designer.cs +++ b/src/DynamoCoreWpf/Properties/Resources.Designer.cs @@ -1503,6 +1503,15 @@ public static string DynamoViewDebugMenuDumpNodeIcons { return ResourceManager.GetString("DynamoViewDebugMenuDumpNodeIcons", resourceCulture); } } + + /// + /// Looks up a localized string similar to NodeIconDataIsDumped. + /// + public static string NodeIconDataIsDumped { + get { + return ResourceManager.GetString("NodeIconDataIsDumped", resourceCulture); + } + } /// /// Looks up a localized string similar to _Force Re-execute. diff --git a/src/DynamoCoreWpf/Properties/Resources.en-US.resx b/src/DynamoCoreWpf/Properties/Resources.en-US.resx index 21a6487c08b..37b280d6f7c 100644 --- a/src/DynamoCoreWpf/Properties/Resources.en-US.resx +++ b/src/DynamoCoreWpf/Properties/Resources.en-US.resx @@ -4163,7 +4163,11 @@ To make this file into a new template, save it to a different folder, then move Enable the new floating menu for node suggestions for a more streamlined workflow. Turn off to return to the traditional pop-up dialog. - _Dump Node Icons + _Dump Node Icon Data + Debug menu | Dump all node icon data + + + Node Icon Data is dumped to \"{0}\". Debug menu | Dump all node icons \ No newline at end of file diff --git a/src/DynamoCoreWpf/Properties/Resources.resx b/src/DynamoCoreWpf/Properties/Resources.resx index 9d83da69684..7e29a7fbe80 100644 --- a/src/DynamoCoreWpf/Properties/Resources.resx +++ b/src/DynamoCoreWpf/Properties/Resources.resx @@ -4147,7 +4147,11 @@ To make this file into a new template, save it to a different folder, then move This group is frozen. Click to unfreeze. - _Dump Node Icons + _Dump Node Icon Data + Debug menu | Dump all node icon data + + + Node Icon Data is dumped to \"{0}\". Debug menu | Dump all node icons diff --git a/src/DynamoCoreWpf/ViewModels/Core/DynamoViewModel.cs b/src/DynamoCoreWpf/ViewModels/Core/DynamoViewModel.cs index aa9b5f2cfb1..cad6851c739 100644 --- a/src/DynamoCoreWpf/ViewModels/Core/DynamoViewModel.cs +++ b/src/DynamoCoreWpf/ViewModels/Core/DynamoViewModel.cs @@ -4304,16 +4304,18 @@ internal void DumpNodeHelpData(object parameter) internal void DumpNodeIconData(object parameter) { - //set to manual run mode + //set to manual run mode to prevent execution of the nodes as wel place them this.HomeSpace.RunSettings.RunType = RunType.Manual; - string fileName = String.Format("NodesWithoutIcons_{0}.csv", DateTime.Now.ToString("yyyyMMddHmmss")); - string fullFileName = Path.Combine(Model.PathManager.LogDirectory, fileName); + string nodesWithoutIconsFileName = String.Format("NodesWithoutIcons_{0}.csv", DateTime.Now.ToString("yyyyMMddHmmss")); + string nodesWithoutIconsFullFileName = Path.Combine(Model.PathManager.LogDirectory, nodesWithoutIconsFileName); //creating a copy to avoid collection changed exceptions var entriesCopy = Model.SearchModel.Entries.Where(n => n.IsVisibleInSearch).ToList(); - StreamWriter sw = File.CreateText(fullFileName); + StreamWriter sw = File.CreateText(nodesWithoutIconsFullFileName); + + sw.WriteLine("NODE ASSEMBLY,NODE NAME"); foreach (var nse in entriesCopy) { @@ -4332,7 +4334,11 @@ internal void DumpNodeIconData(object parameter) this.Model.ExecuteCommand(new DynamoModel.DeleteModelCommand(placedNode.Id)); } } + sw.Close(); + + //alert user to new file location + MainGuideManager.CreateRealTimeInfoWindow(string.Format(Resources.NodeIconDataIsDumped, nodesWithoutIconsFullFileName), true); } private FileInfo GetMatchingDocFromDirectory(string nodeName, string hash, List suffix, DirectoryInfo dir) From 2cfa65e5c2fc5502b59c8510900a07664b950046 Mon Sep 17 00:00:00 2001 From: john pierson Date: Thu, 12 Jun 2025 09:40:12 -0600 Subject: [PATCH 12/12] Update PublicAPI.Unshipped.txt --- src/DynamoCoreWpf/PublicAPI.Unshipped.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/src/DynamoCoreWpf/PublicAPI.Unshipped.txt b/src/DynamoCoreWpf/PublicAPI.Unshipped.txt index 9c14d09765e..0445e797f91 100644 --- a/src/DynamoCoreWpf/PublicAPI.Unshipped.txt +++ b/src/DynamoCoreWpf/PublicAPI.Unshipped.txt @@ -5084,6 +5084,7 @@ static Dynamo.Wpf.Properties.Resources.NodeContextMenuPreview.get -> string static Dynamo.Wpf.Properties.Resources.NodeContextMenuRenameNode.get -> string static Dynamo.Wpf.Properties.Resources.NodeContextMenuShowLabels.get -> string static Dynamo.Wpf.Properties.Resources.NodeHelpIsDumped.get -> string +static Dynamo.Wpf.Properties.Resources.NodeIconDataIsDumped.get -> string static Dynamo.Wpf.Properties.Resources.NodeHelpWindowNodeCategory.get -> string static Dynamo.Wpf.Properties.Resources.NodeHelpWindowNodeDescription.get -> string static Dynamo.Wpf.Properties.Resources.NodeHelpWindowNodeInput.get -> string