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
  • Extensions as Packages
  • Overview
  • Package Structure
  • Uploading
  • Pulling
Edit on GitHub
Export as PDF
  1. Developer Primer
  2. Developing for Dynamo

Extensions as Packages

Extensions as Packages

Overview

Dynamo extensions can be deployed to the package manager just like regular Dynamo node libraries. When an installed package contains a view extension the extension is loaded at runtime when Dynamo loads. You can check the Dynamo console to verify the extension has properly loaded.

Package Structure

The structure of an extension package is the same as a normal package containing...

C:\Users\User\AppData\Roaming\Dynamo\Dynamo Core\2.1\packages\Sample View Extension
│   pkg.json
├───bin
│       SampleViewExtension.dll
├───dyf
└───extra
        SampleViewExtension_ViewExtensionDefinition.xml

Assuming you have already built your extension you will (at a minimum) have a .NET assembly and a manifest file. The assembly should contain a class which implements IViewExtension or IExtension. The manifest .XML file tells Dynamo which class to instantiate in order to launch your extension. For the package manager to correctly locate the extension the manifest file should accurately correspond to the assembly location and naming.

Place any assembly files in the bin folder and the manifest file in the extra folder. Any additional assets can also be placed in this folder.

Example manifest .XML file:

<ViewExtensionDefinition>
  <AssemblyPath>..\bin\MyViewExtension.dll</AssemblyPath>
  <TypeName>MyViewExtension.MyViewExtension</TypeName>
</ViewExtensionDefinition>

Uploading

Once you have a folder containing the sub-directories outlined above you are ready to push (upload) to the package manager. One thing to be aware of is you currently cannot publish packages from Dynamo Sandbox. This means you need to be using Dynamo Revit. Once inside Dynamo Revit navigate to Packages => Publish New Package. This will prompt the user to login to their Autodesk account they wish to associate the package with.

At this point you should be at the normal publish package window where you will enter all the require fields regarding your package/extension. There is one very important additional step which requires you to make sure none of your assembly files are marked as a node library. This is done by right clicking on the files you have imported (the package folder created above). A context menu will appear which gives you the option to check (or un-check) this option. All extension assemblies should be un-checked.

Before publishing publicly you should always publish locally to make sure everything is functioning as expected. One this has been verified you are ready to go live by selecting publish.

Pulling

To verify your package has been successfully uploaded you should be able to search for it given the naming and keywords specified in the publishing step. Finally, it is important to note that same extensions will require a reboot of Dynamo before functioning. Usually these extensions require parameters specified when Dynamo boots up.

PreviousBuild a Package from Visual StudioNextPull Requests

Last updated 3 months ago

Publish a package
Search for packages