The issue I’m having is similar to that posted here:
Unfortunately I’ve attempted the suggestions proposed in that thread and still can’t find a solution.
For those who would like more detailed write up of the issue:
I came up with a little script to get a view template by it’s name. A screenshot of the .dyn file showing the workflow is below:
Once satisfied with the functionality of the script, I select all, right-click on the canvas, and select ‘Create Custom Node’. This prompts the following dialogue box:
I enter in the custom node properties as per the above and click OK, after which 3 visible changes occur:
- DeniNodes appears in the list of third-party packages within the library on the left hand side of the screen.
- All nodes previously contained in my .dyn file have been replaced with the custom node ‘ViewTemplateByName’.
- The custom node ‘ViewTemplateByName’ .dyf file is opened in another tab.
At this point, I format the .dyf file as per the below:
With the node now ready to save, I click the X icon to close the .dyf file and am prompted to save the .dyf file. I save the .dyf file to the path below:
Please note that this path is the default path where my third-party packages are saved and where Dynamo looks to load nodes. This is set using the Manage Node and Package Paths dialogue box (Settings–>Manage Node and Package Paths) as shown below:
Once I click Save I return to my original .dyn file where I test my custom node at it works as intended, as shown below:
The node works perfectly fine until I close my dynamo session. When I reopen the script, my node is red and returns the following error message “Error: Custom node definition is not loaded!”, as shown below:
Additionally, one can see that ‘package directory’ (for lack of a better name) DeniNodes which was previously added to the list of third-party packages within the library on the left hand side of the screen, has now disappeared. All other third-party packages remain.
Could anybody please let me know where I am going wrong with this procedure?
Thank you in advance for your help!