Getting started for developers
Welcome Developers! 🚀
Here's a quick start guide. After reading this, you might want to head to create your own Toolkit.
Building BHoM from Source
Please follow the steps below:
- Use git
clone
(or use GitHub desktop) to download the repositories in the list below. - Use your preferred IDE to build the solutions in the order as they appear below. We recommend Visual Studio Community.
Build order
The first time you build BHoM you need to clone and build the repos in the order specified below.
You must pick all the Mandatory repos.
Rebuilding and seeing changes in the UIs (Grasshopper, Excel, ...)
When building in visual studio, the compiled assemblies will go in the ./Build
folder of your Repo; additionally, there is a Post-Build event that copies the files in the central BHoM folder: C:\ProgramData\BHoM\Assemblies
.
When you build, if there is any UI open (e.g. Rhino/Grasshopper/Revit/Excel), the dlls will not be overwritten in the central folder because they are referenced by the UI software. Therefore, to ensure the changes are visible in the UI, you must make sure to close all UI software, then reopen it to see updated changes.
Debugging and Edit-and-continue
Please have a look at the page dedicated to Debugging and Edit-and-continue for tips on how to be most effective when coding/debugging with BHoM.
Mandatory base repos
Main repos
Compile each of these, one after the other:
User interface(s)
Compile one or more of the following - depending on the User interface software you want to use:
- Rhinoceros_Toolkit and then Grasshopper_Toolkit (requires Rhinoceros_Toolkit)
- Excel_Toolkit
The following repos are optional.
Optional base repos
These repos are sometimes used as stand-alone, and sometimes are also referenced by other repos.
You might find them useful 🚀
- BHoM_Datasets - makes Datasets available (some test scripts might be using them)
- Socket_Toolkit - send messages through Sockets. Some toolkits use this.
- Mongo_Toolkit - database connection. Some toolkits use this.
- Versioning_Toolkit - allows retro-compatibility of components (auto upgrade to newest version).
Toolkits 🌍
Toolkits provide the connection to other software.
Clone and build any toolkit you want to use!
Some examples:
- For Structural FEA analysis
- Robot_Toolkit (for students, Robot offers a free version)
- GSA_Toolkit
- ETABS_Toolkit
- Many others available!
- For Environmental simulation
- IES_Toolkit
- EnergyPlus_Toolkit
- Many others available too!
- Others:
- Speckle_Toolkit
- LifeCycleAssessment_Toolkit
- Explore https://github.com/BHoM ...
FAQ and help
I can't Rebuild the solution: NuGet package(s) missing
error
Sometimes you might encounter this error. Although Visual Studio "Rebuild All" command should take care of Restoring the NuGet packages for you, to solve this just run that manually.
Right click the solution → Restore NuGet Packages
.
I have done some changes to my code, but when I open Grasshopper (or Excel, or ...) the code still behaves as before! Why it is not updated?
After compiling, check that the Build was successful, by looking in the "Output" tab at the bottom of the VS interface; make sure no errors are there, and also that the Post-build event worked successfully. See the notes above.