Script component vs GHPython and C# components

Lately i’ve been converting scripts to either python and C# to learn these languages and have been using the legacy GHPython and C# components for this. I’ve seen the new Script component, but never gave it a try … just the habit of just typing “pyt…” in the search box i guess. When I open file shared on the forum, some people also still use the legacy components.

“This Script component is designed to work with any of the supported languages. While being completely new and internally different from the legacy GHPython and C# components, it tries to replicate the same behaviors as those legacy components and stay familiar as much as possible.”

Long story short > What are the benefit of using one above the other?

  • I assume Script component is designed with the latest features and optimizations, potentially offering better performance and more capabilities than the older, language-specific components, including setting breakpoints, inspecting variables during runtime, and step-by-step execution of scripts.
  • For C# and Python scripts respectively, directly specify and manage external packages
  • Autocomplete, syntax highlighting seems the same
  • Dynamic management of inputs and outputs seems the same, or am i missing something
  • portability to gh v2??

Specifically comparing to GHPython, this is not exactly the case:

At least when implementing .NET and RhinoCommon. The new CPython script editor appears to be more performant than GHPython when the code is pure Python though. But then there is also this (for me) deal breaker:

There are a lot of regression reports in that topic, in general, that might interest you.

wow, you’ve got some history on this topic , haha :stuck_out_tongue: Good reads and great to see your involvement to improve those gh tools, from both performance and UI.

1 Like