Dynamo
Primer for v2.0
English
English
  • About
  • Introduction
    • What is Dynamo & How Does It Work?
    • Primer User Guide, Dynamo Community & Platform
  • Setup for Dynamo
  • User Interface
    • Workspace
    • Library
  • Nodes and Wires
  • Essential Nodes & Concepts
    • Index of Nodes
    • Geometry for Computational Design
      • Geometry Overview
      • Vector, Plane & Coordinate System
      • Points
      • Curves
      • Surfaces
      • Solids
      • Meshes
    • The Building Blocks of Programs
      • Data
      • Math
      • Logic
      • Strings
      • Color
    • Designing with Lists
      • What's a List
      • Working with Lists
      • Lists of Lists
      • n-Dimensional Lists
    • Dictionaries in Dynamo
      • What is a Dictionary
      • Dictionary Nodes
      • Dictionaries in Code Blocks
      • Revit Use-Cases
  • Custom Nodes & Packages
    • Custom Nodes
      • Custom Node Introduction
      • Creating a Custom Node
      • Publishing to Your Library
    • Packages
      • Package Introduction
      • Package Case Study - Mesh Toolkit
      • Developing a Package
      • Publishing a Package
      • Zero-Touch Importing
  • Dynamo for Revit
    • The Revit Connection
    • Selecting
    • Editing
    • Creating
    • Customizing
    • Documenting
  • Dynamo for Civil 3D
    • The Civil 3D Connection
    • Getting Started
    • Node Library
    • Sample Workflows
      • Roads
        • Light Pole Placement
      • Land
        • Service Placement
      • Utilities
        • Rename Structures
      • Rail
        • Clearance Envelope
      • Surveying
        • Point Group Management
    • Advanced Topics
      • Object Binding
      • Python and Civil 3D
    • Dynamo Player
    • Useful Packages
    • Resources
  • Dynamo in Forma Beta
    • Set Up Dynamo Player in Forma
    • Add and Share Graphs in Dynamo Player
    • Run Graphs in Dynamo Player
    • Dynamo compute service differences with Desktop Dynamo
  • Coding in Dynamo
    • Code Blocks and DesignScript
      • What's a Code Block
      • DesignScript Syntax
      • Shorthand
      • Functions
    • Geometry with DesignScript
      • DesignScript Geometry Basics
      • Geometric Primitives
      • Vector Math
      • Curves: Interpolated and Control Points
      • Translation, Rotation, and Other Transformations
      • Surfaces: Interpolated, Control Points, Loft, Revolve
      • Geometric Parameterization
      • Intersection and Trim
      • Geometric Booleans
      • Python Point Generators
    • Python
      • Python Nodes
      • Python and Revit
      • Setup Your Own Python Template
    • Language Changes
  • Best Practices
    • Graph Strategies
    • Scripting Strategies
    • Scripting Reference
    • Managing Your Program
    • Efficiently Working With Large Data Sets In Dynamo
  • Sample Workflows
    • Getting Started Workflows
      • Parametric Vase
      • Attractor Points
    • Concept Index
  • Developer Primer
    • Build Dynamo from Source
      • Build DynamoRevit from Source
      • Managing and Updating Dependencies in Dynamo
    • Developing for Dynamo
      • Getting Started
      • Zero-Touch Case Study - Grid Node
      • Executing Python Scripts in Zero-Touch Nodes (C#)
      • Going Further with Zero-Touch
      • Advanced Dynamo Node Customization
      • Using COM (interop) types in Dynamo Packages
      • NodeModel Case Study - Custom UI
      • Updating your Packages and Dynamo Libraries for Dynamo 2.x
      • Updating your Packages and Dynamo Libraries for Dynamo 3.x
      • Extensions
      • Defining Custom Package Organization for Dynamo 2.0+
      • Dynamo Command Line Interface
      • Dynamo Integration
      • Developing For Dynamo For Revit
      • Publish a Package
      • Build a Package from Visual Studio
      • Extensions as Packages
    • Pull Requests
    • Testing Expectations
    • Examples
  • Appendix
    • Frequently Asked Questions
    • Visual Programming and Dynamo
    • Resources
    • Release Notes
    • Useful Packages
    • Example Files
    • Host Integration Map
    • Download PDF
    • Dynamo Keyboard Shortcuts
Powered by GitBook
On this page
Edit on GitHub
Export as PDF
  1. Developer Primer

Examples

PreviousTesting ExpectationsNextAppendix

Last updated 3 months ago

If you are looking for examples on how to develop for Dynamo, take a look at these resources below:

Sample Repositories

These samples are Visual Studio templates that you can use to start your own project:

  • : Template for basic ZeroTouch nodes.

    • Return multiple outputs:

    • Use a native geometry object from Dynamo:

    • Example property (Query node):

  • : Templates for basic NodeModel nodes and view customization.

    • Basic NodeModel template:

      • Define node attributes (Input/output names, descriptions, types):

      • Return null node if there are no inputs:

      • Create a function call:

    • Basic NodeModel view customization template: , , ,

      • Alert the UI that an element needs to update:

      • Customize the NodeModel:

      • Define slider attributes:

      • Determine interaction logic for the slider:

  • : Templates for ZeroTouch, custom UI, tests, and view extensions.

      • Create a basic, custom UI node:

      • Create a drop-down menu:

      • System tests:

      • ZeroTouch tests:

    • :

      • Example ZeroTouch nodes, including one that implements IGraphicItem to affect geometry rendering:

      • Example ZeroTouch nodes for coloring geometry using IRenderPackage:

    • : An IViewExtension implementation that shows a modeless window when its MenuItem is clicked.

  • : Templates for advanced Dynamo package development using NodeModel.

    • Essential samples:

    • Geometry samples:

    • UI samples:

Case Studies

Third party developers have made significant and exciting contributions to the platform, many of which are open source as well. The following projects are exceptional examples of what can be done with Dynamo.

Ladybug is a Python library to load, analyze and modify EnergyPlus Weather files (epw).

Honeybee is a Python library to create, run and visualize the results of daylight (RADIANCE) and energy analysis (EnergyPlus/OpenStudio).

Bumblebee a plugin for Excel and Dynamo Interoperability (GPL).

Clockwork is a collection of custom nodes for Revit-related activities as well as other purposes such as list management, mathematical operations, string operations, geometric operations (mainly bounding boxes, meshes, planes, points, surfaces, UVs and vectors) and paneling.

: A ZeroTouch library for creating text in Dynamo.

ZeroTouchEssentials
Code
Code
Code
HelloDynamo
HelloNodeModel.cs
Code
Code
Code
HelloGui.cs
HelloGuiNodeView.cs
Slider.xaml
Slider.xaml.cs
Code
Code
Code
Code
DynamoSamples
UI samples
CustomNodeModel.cs
DropDown.cs
Tests
HelloDynamoSystemTests.cs
HelloDynamoZeroTouchTests.cs
ZeroTouch examples
BasicExample.cs
ColorExample.cs
View extension examples
NodeModelsEssentials
Error
MultiOperation
Multiply
Timeout
CustomPreview
SurfaceFrom4Points
UVPlanesOnSurface
WobblySurface
Button
ButtonFunction
CopyableWatch
Slider
SliderBound
State
DynaText
https://github.com/ladybug-tools/ladybug
https://github.com/ladybug-tools/honeybee
https://github.com/ksobon/Bumblebee
https://github.com/andydandy74/ClockworkForDynamo