# Publishing to Your Library

We've just created a custom node and applied it to a specific process in our Dynamo graph. And we like this node so much, we want to keep it in our Dynamo library to reference in other graphs. To do this, we'll publish the node locally. This is a similar process to publishing a package, which we'll walk through in more detail in the next chapter.

By publishing a node locally, the node will be accessible in your Dynamo library when you open a new session. Without publishing a node, a Dynamo graph which references a custom node must also have that custom node in its folder (or the custom node must be imported into Dynamo using _File > Import Library_).

{% hint style="warning" %}
You can publish custom nodes and packages from Dynamo Sandbox in version 2.17 and newer, as long as they have no host API dependencies. In older versions, publishing custom nodes and packages is only enabled in Dynamo for Revit and Dynamo for Civil 3D.&#x20;
{% endhint %}

## Exercise: Publishing a Custom Node Locally

> Download the example file by clicking on the link below.
>
> A full list of example files can be found in the Appendix.

{% file src="https://1734247194-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FY5ZuHF3yuXFWp1C46ZSo%2Fuploads%2Fgit-blob-7f4cc018aab3b720a5d9a6f67cac091706b9ea3b%2FPointsToSurface.dyf?alt=media" %}

Let's move forward with the custom node that we created in the previous section. Once the PointsToSurface custom node is opened, we see the graph in the Dynamo Custom Node Editor. You can also open up a custom node by double clicking on it in the Dynamo Graph Editor.

![](https://1734247194-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FY5ZuHF3yuXFWp1C46ZSo%2Fuploads%2Fgit-blob-8f2ffea53ed338316ceb5a4518cc7c8aba85a740%2Fpublish%20custom%20node%20locally%2001.jpg?alt=media)

To Publish a custom node locally, simply right click on the canvas and select _"Publish This Custom Node..."_

![](https://1734247194-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FY5ZuHF3yuXFWp1C46ZSo%2Fuploads%2Fgit-blob-c1715aaa9bc70e120f4aff771ccf552c5ea92e1d%2Fpublish%20custom%20node%20exercise%20-%2002.jpg?alt=media)

Fill out the relevant information similar to the image above and select _"Publish Locally"._ Note that the Group field defines the main element accessible from the Dynamo menu.

<figure><img src="https://1734247194-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FY5ZuHF3yuXFWp1C46ZSo%2Fuploads%2FdvF1Mvkta2mwLtJoSF1n%2Fpublish_a_package.png?alt=media&#x26;token=19f308ea-12ef-49d5-b171-3c2172b541e8" alt=""><figcaption></figcaption></figure>

Choose a folder to house all of the custom nodes that you plan on publishing locally. Dynamo will check this folder each time it loads, so make sure the folder is in a permanent place. Navigate to this folder and choose _"Select Folder"._ Your Dynamo node is now published locally, and will remain in your Dynamo library each time you load the program!

![](https://1734247194-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FY5ZuHF3yuXFWp1C46ZSo%2Fuploads%2Fgit-blob-96ddc59610cb8ef6c024accf91e15ad7dcb3e1d5%2Fpublish%20custom%20node%20exercise%20-%2004.jpg?alt=media)

To check on the custom node folder location, go to _Dynamo > Preferences > Package Settings > Node and Package Paths._

<figure><img src="https://1734247194-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FY5ZuHF3yuXFWp1C46ZSo%2Fuploads%2F3b9L2fRN5LuzIxaxcj7O%2Fsettings.png?alt=media&#x26;token=a70b7c5e-d880-4146-a9dc-f2e8880a7fb9" alt="" width="520"><figcaption></figcaption></figure>

In this window we see a list of paths.

<figure><img src="https://1734247194-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FY5ZuHF3yuXFWp1C46ZSo%2Fuploads%2FDqbVADddASHuco8lIWrh%2Fpackage-locations.png?alt=media&#x26;token=3d7e30ee-48b8-4f71-a5dc-58de7a7025a9" alt=""><figcaption></figcaption></figure>

> 1. _Documents\DynamoCustomNodes..._ refers to the location of custom nodes we've published locally.
> 2. _AppData\Roaming\Dynamo..._ refers to the default location of Dynamo Packages installed online.
> 3. You may want to move your local folder path down in the list order (by clicking on the down arrow to the left of the path name). The top folder is the default path for package installs. So by keeping the default Dynamo package install path as the default folder, online packages will be separated from your locally published nodes.

We switched the order of the path names in order to have Dynamo's default path as the package install location.

<figure><img src="https://1734247194-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FY5ZuHF3yuXFWp1C46ZSo%2Fuploads%2Fzta2tyBmtUZnWvRlSjMI%2Fupdated-package-locations.png?alt=media&#x26;token=4cda0104-ee8b-4ba6-935b-ee0c41bbb47a" alt=""><figcaption></figcaption></figure>

Navigating to this local folder, we can find the original custom node in the _".dyf"_ folder, which is the extension for a Dynamo Custom Node file. We can edit the file in this folder and the node will update in the UI. We can also add more nodes to the main _DynamoCustomNode_ folder and Dynamo will add them to your library at restart!

![](https://1734247194-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FY5ZuHF3yuXFWp1C46ZSo%2Fuploads%2Fgit-blob-e650917459cba9e866037612c55430e7180336ab%2Fpublish%20custom%20node%20exercise%20-%2008.jpg?alt=media)

Dynamo will now load each time with "PointsToSurface" in the "DynamoPrimer" group of your Dynamo library.

![](https://1734247194-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FY5ZuHF3yuXFWp1C46ZSo%2Fuploads%2Fgit-blob-39bb80e62433c276227cf932da4c0bf4c568503e%2Fpublish%20custom%20node%20exercise%20-%2009.jpg?alt=media)
