Quantcast
Channel: Scripting - McNeel Forum
Browsing all 5938 articles
Browse latest View live

Rhino Script Scheduled Run

Hi All, I’m working on a program that will take a user supplied text file template or (eventually) via a SQL query, then convert it to a drawing. The idea is that the text files will be created...

View Article


Mismatch Python Version between RunPythonScript and ScriptEditor

Hi everyone, i’m currently writing some functions in python language using the Rhino built-in ScriptEditor. The very confusing problem is, that i do get different behavior if i run the code using...

View Article


Python Opening RUI and making toolbar visible

Trying to open a toolbar through python and making sure it is visible.I have found some examples using C# but am having trouble with Python. I can open it with Rhino.RhinoApp.ToolbarFiles.Open(Path)...

View Article

Using Custom Grasshopper Components on other Devices

I’m new to using custom Grasshopper components in Rhino 8 and have run into an issue with my script that uses the xlsxwriter Python package. I’ve successfully installed and used the package on my...

View Article

Image may be NSFW.
Clik here to view.

How to call function from another python file

Hi all, This is probably a dumb question. I’m making a test project through Script Editor in Rhino 8. There are only 2 py files in the same folder. #! python3 # m1.py def main(): print("Hello I'm m1")...

View Article


Image may be NSFW.
Clik here to view.

ScriptEditor Grasshopper not working

Hi, What has happened with Scripteditor for Grasshopper Python? Any code I copy paste freezes Rhino completely. This is some basic math: from math import cos, sin, pi H0 = 9.145 V0 = 2.37 xV0 = 0.723...

View Article

Image may be NSFW.
Clik here to view.

Bug: rs.CreatePlane() not working in Py3

Hi all, Code below is simple. In py2 it works well, but in Py3 it gets error messages: “if raise_on_bad_input: raise TypeError(”%s can not be converted to a Plane"%plane) TypeError: 0,0,0 can not be...

View Article

Python Editor Intellisense Does NOT Work With "from import" Statement

I have my common scripts in file called CommonScripts. When I import that file, intellisense stops working. Why? If I comment out the from import line, intellisense works but then of course I cannot...

View Article


Image may be NSFW.
Clik here to view.

ScriptEditor Python in Grasshopper crashes on any code

Hi, ScriptEditor on Grasshopper crashes on any code. I reinstalled Rhino8. Also deleted .rhinocode folder and installed Rhino8 again latest release same problem. Rhino Python scripteditor works but...

View Article


Image may be NSFW.
Clik here to view.

Same code works in "editpythonscript", but not "scripteditor"

Running a python script when changing the viewport Scripting If it’s only to detect a change of active view you can use the below. Note that if you run the script it will add the watcher to the active...

View Article

Image may be NSFW.
Clik here to view.

Alignment objects at the same distance from each other

Hi all. This is the UV Curve of cylinder, which has a 60 mm in length. In this example, there are three united groups inside the bounding boxes. These groups need to be distributed at the same...

View Article

Image may be NSFW.
Clik here to view.

Rhino8,C# Script Editor error

I can’t get my file name of the Grasshopper file by using “GH_Document.FilePath” 2 posts - 2 participants Read full topic

View Article

Image may be NSFW.
Clik here to view.

Per Project Module Search Paths?

This is a question about the Script Editor’s > Tools > Options > Python > Module Search Paths, in both Rhino and Grasshopper it appears to be an application level setting. On the Rhino...

View Article


Image may be NSFW.
Clik here to view.

Rhinoscriptsyntax Command Bugging GH canvas?

Hello, I have this pretty simple script that prompts the user to draw a line via RhinoScriptSyntax (rs.GetLine) in Rhino and then uses that to Scale a Grasshopper object but when I complete the rhino...

View Article

IronPython scripting - ghpython on Rhino 8

Hi McNeel, I’ve got an issue concerning GHPython. Here is the line I use to import it. import ghpythonlib.components as ghcomp Which worked well using Rhino 8.3. After an update to Rhino 8.8, this...

View Article


Batch-create simple Rhino materials from Grasshopper

Cobbled together this little script by picking apart this from Nathan along with some help from ChatGPT Takes a button, list of file paths (image files), and list of names. Batch creates super basic...

View Article

Python: Comparison of Equal Points Fails

Can anyone explain why the comparison of 2 equal points fails in the following code? If I create the point using Rhino.Input.Custom.GetPoint() rather than rg.Point3D, then it works just fine. pStart =...

View Article


Image may be NSFW.
Clik here to view.

CSharp code Editor crash in Rhino 8

Hi to everyone! I’m new to C# scripting and I’m encountering a problem when writing in the C# script component inside Grasshopper . I’m currently using Rhino version 8.9.24194.18121. Rhino crashes...

View Article

Image may be NSFW.
Clik here to view.

Tweak -Modify Object color Python script

Hi all Python Genuises out there. www.rhino3d.com Modify Object Color Demonstrates how to modify the color of a user-specified object. I Realy like this script to change object colors on the go , The...

View Article

Async python script as command in plugin?

I’ve got some async Python3 scripts that run in the ScriptEditor, but as soon as I try to package them into a plugin, they lose the async property. Is there a way to keep the async behavior within the...

View Article
Browsing all 5938 articles
Browse latest View live