{
 "schema": "aiblocks-page/1",
 "id": "write-a-rhino-modeling-script",
 "type": "skill",
 "name": "Rhino modeling script writer",
 "summary": "Share your Rhino task, version and model details. Get a script with steps to check it.",
 "headline": "Rhino modeling script writer",
 "subhead": "Share your Rhino version, task and source script. Choose the right API and guard each change. Get code and steps to check it.",
 "job": {
  "id": "design-work",
  "name": "Design things people love"
 },
 "level": "intermediate",
 "thinking": "medium",
 "tested": true,
 "updated": "2026-10-28",
 "first_published": "2026-10-25",
 "inputs": [
  {
   "type": "question",
   "required": true,
   "label": "Question",
   "what": "the problem, decision or piece of work you want help with, and what a good outcome looks like"
  },
  {
   "type": "codebase",
   "required": true,
   "label": "Codebase",
   "what": "a project's code, in a folder or repo the AI can open"
  }
 ],
 "outputs": [
  {
   "type": "code_change",
   "required": true,
   "label": "Code change",
   "what": "a change to the code, with what it fixes and how it was checked"
  },
  {
   "type": "document",
   "required": true,
   "label": "Document",
   "what": "a finished document, such as a Word file, a PDF or a page of notes"
  }
 ],
 "you_give": [
  "The Rhino version, modeling task, document units, input geometry and any existing script."
 ],
 "you_get": [
  "A script file in the language that fits your task, ready to paste into Rhino's Script Editor.",
  "The exact way to run it, by Script Editor steps or a run command.",
  "A short list of checks to do in Rhino to confirm it worked.",
  "A plain note on what was not tested, since your AI cannot run Rhino."
 ],
 "use_when": [
  "You want a new Rhino script for a modeling task, such as editing many objects at once.",
  "A script you have fails, freezes Rhino, or undoes only one object at a time.",
  "You need to share a script with a teammate or run it when Rhino starts.",
  "Not for a fixed list of commands with no variables (use a command macro) or for non-Rhino CAD work."
 ],
 "skip_when": [
  "You only need a fixed run of commands with no variables or loops: use a Rhino command macro instead.",
  "You work in other CAD software, not Rhino: use that program's own scripting help.",
  "You need proof the script runs in Rhino: run it yourself, because your AI cannot test it for you."
 ],
 "output_sample": {
  "input": [
   "Your Rhino version",
   "What you want the script to do",
   "Your document units and the geometry it works on",
   "Your existing script, if you have one (optional)"
  ],
  "prerequisites": [
   "Rhino 7 or later, with Rhino 8 best. The skill is written for Rhino 8 (one Script Editor for Python 3, VB and C#). On Rhino 7, use the older Python and VBScript editors and expect some features to differ.",
   "Rhino's Script Editor to run the result"
  ],
  "output": [
   {
    "name": "Script choice",
    "contains": "Which type fits your task: Python, VBScript, C# or a command macro, and why."
   },
   {
    "name": "Script code",
    "contains": "The full script, with checks on picked objects and your document's tolerance."
   },
   {
    "name": "Redraw and undo handling",
    "contains": "Code that pauses redraw, groups changes into one undo step, and restores the view if something fails."
   },
   {
    "name": "How to run it",
    "contains": "Steps to open the Script Editor or run the file by name, or set up a toolbar button."
   },
   {
    "name": "Checks to perform",
    "contains": "What to look for in Rhino to confirm the script did the right thing."
   },
   {
    "name": "Verification limits",
    "contains": "A plain note that the script was not run in Rhino, and what that leaves unchecked."
   }
  ]
 },
 "how_to_use": [
  "Open Claude, ChatGPT or Gemini and paste in the skill text.",
  "Tell your AI your Rhino version, your task, your document units and what geometry the script touches.",
  "Paste your current script if you have one.",
  "Save a copy of your Rhino file first, since the script changes objects in it. Then copy the code into Rhino's Script Editor and run it with the steps your AI gives you.",
  "Do the listed checks in Rhino, then send any error text back to your AI to fix.",
  "Next, once it runs, save the script in a folder listed under Options, Files, Search paths. Then add a toolbar button or alias with the macro ! _-RunPythonScript \"MyScript.py\" (Python), or add the file to the Startup list under Tools, Options to load it every session."
 ],
 "checks": [],
 "next": [
  {
   "name": "Small usability test planner",
   "url": "https://useaiblocks.com/skills/small-usability-test-planner",
   "why": "Design it"
  }
 ],
 "source": {
  "by": "github",
  "repo": "github/awesome-copilot",
  "url": "https://github.com/github/awesome-copilot/tree/613efc8c21d9b3ce642dff361d17006cd9967e28/skills/rhino3d-scripts",
  "licence": "MIT",
  "original_name": "rhino3d-scripts",
  "commit": "613efc8c21d9b3ce642dff361d17006cd9967e28"
 },
 "credits": [
  {
   "title": "rhino3d-scripts skill",
   "by": "github",
   "url": "https://github.com/github/awesome-copilot/tree/613efc8c21d9b3ce642dff361d17006cd9967e28/skills/rhino3d-scripts",
   "used": "Original instructions and supporting files, with attribution and the MIT licence. Display copy describes the task."
  }
 ],
 "files": [
  "LICENSE",
  "references/macros-and-loading.md",
  "references/rhinocommon-map.md",
  "references/rhinoscriptsyntax-cheatsheet.md",
  "references/vbscript-quirks.md"
 ],
 "links": {
  "page": "https://useaiblocks.com/skills/write-a-rhino-modeling-script",
  "markdown": "https://useaiblocks.com/skills/write-a-rhino-modeling-script.md",
  "json": "https://useaiblocks.com/skills/write-a-rhino-modeling-script.json",
  "instructions": "https://useaiblocks.com/skills/write-a-rhino-modeling-script/SKILL.md",
  "download": "https://useaiblocks.com/skills/write-a-rhino-modeling-script.zip",
  "api_item": "https://useaiblocks.com/api/v1/items/write-a-rhino-modeling-script",
  "api_document": "https://useaiblocks.com/api/v1/documents/skill/write-a-rhino-modeling-script",
  "mcp": "https://useaiblocks.com/mcp"
 }
}
