IDE


Where to program?


Developers use an IDE (Integrated Development Environment) to write their programs. An IDE is a program that provides all the tools needed to write, compile, and debug a program.

Rhino8 has its own IDE called Script Editor. To open it run the following command in the terminal of Rhino8:

!_ScriptEditor


Let’s have a look now at the different parts of the Script Editor.

Rhino IDE UI


The Script Editor is divided into 8 parts, each one has a specific function, have a look at the image below:

  • The green part is where you truly write your code. This is where you will spend most of your time,
  • The blue part is where you can run your code and choose different options of your editor,
  • The red part is where you can debug your code,
  • The yellow part is where you can manage your code,
  • The orange part is where you can select which code to edit,
  • The grey part is where you can learn more about the way the Script Editor works.

Run a script


To run a script in the Script Editor you need to open a new directory where your scripts are and click on the Run button on the file you want to run.

An IDE can be intimidating at first but don’t worry, you will get used to it very quickly, it’s going to be your best friend.

🛠 Run your first script in the Script Editor. Download the following file in the folder of your choice and run it. You should see a message in the terminal of Rhino8 or in the Output window of the Script Editor (7) that says: Welcome to AR-327!.

🐍⬇️⬇️⬇️ Download the script to run here ⬇️⬇️⬇️🐍


Why an IDE?


Programming can be difficult. That’s why we use an IDE. It makes programming easier with many features, among the most important:

(a) Syntax highlighting: It highlights the different parts of the code with different colors. This makes it easier to read and understand the code.

(b) Intellisense: It suggests the different options available for each part of the code. This makes it easier to write code.

(c) many others..: such as auto-completion, code folding, code snippets, file explorer, etc.

You know all the necessary to start coding in Python. Let’s start with the basics.

Basic Shortcuts


In time you will get used to the Script Editor and you will be able to write your code faster. One way to code faster and more efficiently is to use shortcuts. Here are some of the most useful shortcuts in the Script Editor that wee use daily in our practice (for windows):

Shortcut Description
Ctrl + K, Ctrl + C Add Line Comment
Ctrl + K, Ctrl + U Remove Line Comment
Ctrl + Shift + K Delete line
Ctrl + F Find
Ctrl + H Replace
Alt + Up/Down Arrow Move Line Up/Down
Shift + Alt + Up/Down Copy Line Up/Down
Ctrl + Enter Insert Line Below
Ctrl + Shift + Enter Insert Line Above
Ctrl + D Add Selection to Next Find Match
Ctrl + L Select Line
Ctrl + Shift + L Select All Occurrences of Current Selection
Ctrl + Space Trigger Suggest
Ctrl + Shift + [ Fold (Collapse) Region
Ctrl + Shift + ] Unfold (Expand) Region
Ctrl + K, Ctrl + 0 Fold All Regions
Ctrl + K, Ctrl + J Unfold All Regions
Ctrl + K, Ctrl + S Save All