Process

A guide on contributing to Dynamo for Revit - Part 2

Back to Insights
Grey down arrow

Sylvester Knudsen
June 27, 2020

Part 2: Getting started 

In this section, we’ll discuss how to begin your contribution to Dynamo for Revit by ‘forking the repo’.

Forking the repo

The very first thing we need to do is to fork the Dynamo repository. If you're not sure what this means, it’s essentially when you make your own personal copy of someone else's repository.

Forks are used to either propose changes to someone else's project or to use someone else's project as a starting point for your own idea.
Source: Github

To fork the Dynamo repo, head over to Dyanmo’s Github and open the DynamoRevit repo. Here, you'll notice the ’fork’ button (and icon) at the top of the screen.

Press it and you’ll see a dialog box that looks something like the image below. Select the Github account you want to fork the DynamoRevit repo to.

You should now have a copy of the DynamoRevit repo in your own Github account - this is your repo and you can add changes to it without worrying about messing anything up. Go ahead and clone this repo to your local machine.

Writing code

Your repo will contain a series of files and folders. There should also be a solution file called ‘DynamoRevit.All.sln’ - this is important because this is where you add and edit code.

For most projects, all you need to worry about is the ‘Libraries’ and ‘Tests’ folders. In the ‘Libraries’ folder, you’ll see two projects, one called ‘RevitNodes’ and another called ‘RevitNodesUI’. These projects are where all the DynamoRevit nodes live and it's where you add your own code as well.

The final step before we can start writing code is making sure that we have all the dependencies we need for building a solution.

To do this, head to a folder called ‘src’ in the DynamoRevit repo. Here, you'll see a file called ‘restorepackages.bat’ - this is the file we use to house all solution dependencies. There are a few different ways of running this file - I usually run it directly from Visual Studio as I find it easier.

To run the file, go to the ‘Package Manager Console’in Visual Studio and type in the following path: ‘.\restorepackages.bat’

You’re now ready to start writing code in the DynamoRevit solution! In Part 3, we'll explore how to test your code.

A guide on contributing to Dynamo for Revit - Part 3

Part 3: Testing. In this part of our series on how to contribute to Dynamo, we'll run through how to test your code.
Read more

A guide on contributing to Dynamo for Revit - Part 4

Part 4: Making a pull request. In the final part of our series on how to contribute to Dynamo, we'll go through how to make and submit a pull request.
Read more

A guide on contributing to Dynamo for Revit - Part 1

Part 1: Why Contribute? This part of our series on contributing to Dynamo introduces the contribution process and discusses why it's worth getting involved.
Read more

Subscribe to Our Newsletter

Stay up to date with our latest news and product launches.
Thank you! We've added you to our mailing list.
Oops! Something went wrong while submitting the form.