Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Monty PythonNew to Visual Studio Code? Get it now.
Monty Python

Monty Python

Three-Point-Square

|
111 installs
| (0) | Free
Sends Python or C# scripts to Grasshopper from VS Code.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

This VS Code extension allows users to send Python scripts from VS Code to a Grasshopper listener component for execution.

Features

  • Easily send Python or C# scripts to Grasshopper with a single command.
  • Works with a Grasshopper HTTP listener to process and execute the code.

Usage

  1. Install the extension in VS Code.
  2. Open a Python file or c# file
  3. Press F3 to send the current Python script to the Grasshopper listener.
  4. Press F4 to send the current c# script to the Grasshopper listener.

Installation

From the Marketplace

  • Install the extension directly from the Visual Studio Code marketplace.

Manual Installation

  • Download the .vsix file.
  • In VS Code, go to Extensions (Ctrl+Shift+X), click on the three dots in the top right corner, and select Install from VSIX.

Example

// #! csharp
using System;
using System.Collections.Generic;
using Rhino.Geometry;

List<Point3d> points = new List<Point3d>();

Console.WriteLine("a Shrubbery!!!!..");


if (curve == null)
{
    Rhino.RhinoApp.WriteLine("Curve input is null.");
}
else if (count <= 0)
{
    Rhino.RhinoApp.WriteLine("Invalid count.");
}
else
{
    double curveLength = curve.GetLength();
    Rhino.RhinoApp.WriteLine("Curve length: " + curveLength);
    Rhino.RhinoApp.WriteLine("Number of points: " + count);

    for (int i = 0; i < count; i++)
    {
        double t = curveLength * i / (count - 1);
        Point3d pt = curve.PointAtLength(t);
        points.Add(pt);
        Rhino.RhinoApp.WriteLine($"Generated point {i + 1}: {pt}");
    }

    A = points;  // Output the list of points
    Rhino.RhinoApp.WriteLine($"Total points generated: {points.Count}");
}
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft