Defining Custom Package Organisation for Dynamo 2.0+
Achieving a desired layout for your package depends on the types of nodes you will be including in your package. Node Model derived nodes, ZeroTouch nodes, and Custom nodes all have a slightly different process for defining the categorization. You can mix and match these node types within the same package, but it will require a combination of the strategies outlined below.
NodeModel
NodeModel libraries are organized based on the class structure by default.
Node will be located in Add-ons under:
You can also override the category by using the NodeCategory attribute on the class or in the constructor as shown below.
The node will now be located in Add-ons under:
ZeroTouch
ZeroTouch libraries are also organized based on the class structure by default.
Node will be located in Add-ons under:
You can also override the class structure location by using a Dynamo Customization XML file.
The XML file must be named accordingly and be included in the
extra
folder of the packagePackageName_DynamoCustomization.xml
CustomNodes
Custom nodes are organized based on the specified Category Name
during the nodes creation (using the new Custom Node dialog box).
WARNING!
Using dot-notation in node Names or Categories will result in additional nested sub-categories. The .
will work as a delimiter to determine the additional hierarchy. This is new behavior in the library for Dynamo 2.0.
The Category Name can later be updated in the .dyf file (XML or JSON)
Package Node Migration Strategies
When a package author decides to rename previously existing node in a new release they should provide a means for migrating graphs that contain nodes with the old names. This can be accomplished in the following ways...
ZeroTouch nodes use a Namespace.Migrations.XML
file located in the packages bin
folder such as:
MyZeroTouchLib.MyNodes.SayHello
to MyZeroTouchLib.MyNodes.SayHelloRENAMED
NodeModel derived nodes use the AlsoKnownAs
attribute on the class such as:
SampleLibraryUI.Examples.DropDownExample
to SampleLibraryUI.Examples.DropDownExampleRENAMED
Last updated