5 reasons why move beyond grasshopper and dynamo?

Python and C# in AEC: 5 Reasons why Move Beyond Grasshopper and Dynamo?

After becoming comfortable with Grasshopper or Dynamo, you may wonder what’s next on your learning journey. Visual programming provides a fantastic introduction to the world of coding, mainly because of the instant results it offers. Every time I quickly prototype a simple script, it’s like a dopamine rush for my engineering mind. However, there’s so much more to explore. Here’s why Python and C# might be the next steps for your AEC projects.

Table of Contents

Sign up for free mailing and you will receive a valuable piece of knowledge about Grasshopper every week.
Already more than 8,000 engineers study with me and take full advantage of the power of Parametric Design.

Grasshopper/Dynamo vs. Python and C#

At first glance, the difference between these might seem minor. However, direct coding doesn’t provide results as quickly as visual programming does. Every change in direct coding goes through a compilation phase. What’s the compilation phase? It’s when written code is turned into executable instructions. In contrast, visual programming often shows changes instantly without needing this step.

Traditional coding comes with a more challenging learning curve than the user-friendly nature of visual programming. Graphical concepts are generally easier for architects and engineers to grasp compared to a dense block of text. The immediate feedback from visual outputs can give the illusion that programming is simple. From personal experience, text-based programming demands more time and effort.

Text-based programming inside Grasshopper - GHPython script
Text-based programming inside Grasshopper - GHPython script

Python and C# inside Visual Programming

Every tool has its boundaries, and visual programming isn’t an exception. After a certain point, certain aspects, like slow processing speeds and cluttered wiring, can become frustrating. However, the real strength of platforms like Grasshopper and Dynamo is their ability to integrate custom scripts. By starting with the basics, you can replace things like basic “if” statements or employ functions not originally present in the software. As you progress, this approach becomes second nature and paves the way to advanced features, such as Open APIs or incorporating Chat-GPT into your visual scripts.

Text-based programming inside Dynamo- Python script
Text-based programming inside Dynamo- Python script

Where do text text-based programming languages win with visual programming?

See the list below where Python and C# stand out.

  1. Speed

We all value the visual intuitiveness of Grasshopper and Dynamo. However, as designs become increasingly complex, these tools can start to lag. With the rescue comes text-based programming. That’s why C# or Python can be used to optimize algorithms. Perhaps without overhauling the entire script, but by beginning with minor modifications and swapping out certain components, performance can be enhanced.

2. Clarity

Transitioning to text-based languages eliminates the mess of wires, providing a workspace akin to a tidy room. It also simplifies collaboration, especially when sharing scripts with others. This ensures that your code remains untouched.

C# script editor in Grasshopper
C# script editor in Grasshopper

3. Open API Access with Python and C#

You may have come across the term “Open API”. It stands for Application Programming Interface.

At a glance, it might come off as technical jargon, but think of it like a helpful waiter at your favourite diner. To put it simply: Just as a waiter takes your order to the kitchen, an Open API serves as a connector between software tools, ensuring they communicate smoothly.

Why the term “Open”? It indicates its wide accessibility. Much like a waiter serving various customers, an Open API caters to many users, albeit with varying degrees of user-friendliness.

Access the software API with Python and C#
Access the software API with Python and C#

And what’s the preferred language? In the AEC sector, C# holds prominence. Analogous to English being a global lingua franca, C# acts as a common language for many software applications, facilitating transparent interactions with the Open API. Nevertheless, due to Python’s simplicity and versatility, it’s gaining traction rapidly, and many software tools are accessible through it.

4. Security

Visual programming becomes limiting when specific plugins are unavailable. In larger companies, installing third-party components spontaneously is often restricted due to cybersecurity concerns, or there might be a waiting period until they’re verified as safe. Hence, having third-party components in plain code format is advantageous. It not only ensures security but also provides the flexibility to tailor the code to specific needs effortlessly.

5. More appropriate for bigger projects

From my observations, there’s only a marginal difference when it comes to minor tasks. However, performance significantly decreases when the number of instances grows from tens to hundreds. Handling tens of objects typically involves simpler automation tasks such as tagging, parameter management, or other minor activities. Challenges emerge when faced with increasingly complex and recurrent automation issues specific to engineering tasks.

Conclusion

While a background in visual programming is beneficial, it often falls short for daily difficulties, especially in the demanding world of design and engineering. A well-rounded skill set is essential, incorporating both visual and text-based programming. For one-off, unique tasks within a small team or project, visual programming, like Grasshopper and Dynamo, stands out for its speed, user-friendliness, and easy deployment. However, for larger, repetitive tasks spanning multiple projects and teams, integrating traditional programming skills becomes crucial. The decision is on your side, and it often depends on three core factors: Performance, Scalability, and Flexibility.

Consider this article your official invitation to the most crucial event of the year!

The subject: PYTHON VS C# IN THE AEC INDUSTRY: What’s the best language to learn?

Join me and our experts – Marcin and Sverre, who will examine the pros and cons of both of these languages, providing you with useful tips to help you make the right choice.

During the workshops, we will discuss what each language does well and how they differ, especially in the context of work in the AEC sector, as well as their strengths and weaknesses, including speed, ease of use, and cooperation with other tools that you may already be using.

By participating in the workshops, you will gain:

  • A friendly, easy-to-understand comparison of C# and Python, focused on their pros and cons in the AEC industry.
  • Real-life examples that show where each language truly excels.
  • Tips on how C# and Python cooperate with popular tools used in the AEC sector.

Registered users will gain access to special documents: a mind map that lists the good and bad sides of each language, a summary sheet that will help you make a smart choice, and a recording of the workshops.

We invite you to these fascinating and useful workshops – find out which programming language is best for your work in AEC.

Register now!

Did you like that post ? Share it with others !

We spend a lot of time and effort creating all of our articles and guides. It would be great if you could take a moment to share this post !

Share:

Comments:

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments

Author:

Download BIM CASE STUDIES:

After reading this guide you will learn:

  • How BIM is used on the biggest projects in Norway
  • What were the challenges for the design team and how were they solved
  • What were the challenges on the construction site and what was our approach to them

Newest articles: