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

Image may be NSFW.
Clik here to view.

Treehelpers th.list_to_tree is failing to output in Grasshopper

I have implemented Treehelpers in a python script (attached). I am running the script in a GhPython component. When I connect a panel to an output named x, I have a null value, thogh when I print the...

View Article


Get object GUID in grasshopper Python component

Hello, I am trying to reference a piece of geometry, eg a BREP, into Grasshopper from Rhino, then plug this into a Python component and find out what its GUID is. Im using RhinoCommon not...

View Article


UserText vs UserString vs UserDictionary

Hello all, I am trying to work with ‘Attribute User Text’ via python in grasshopper. I can get and set these Key and Value pairs with rhinoscriptsyntax as below, My first question is, is there a way...

View Article

Naming object fail

Hi, using visual studio and C# to create some automation I need to assign a name to an object as follow: obj.Object().Attributes.Name = obj.Object().Name.Replace("PS", "").Replace("SB", "") +...

View Article

Issue: Rhino8 freezes when I try install pip library in the ScriptEditor

When I try to install a python3 pip package in the ScriptEditor, the application freezes when I run the script. This also happens for other libaries (e.g. “numpy”), when I include a version number...

View Article


Python Script equivalent to RhinoScript Rhino.SetCursorPos

Hi there, I’m pretty new to programming and all. I’ve been trying to write a Python version of Jarek’s SetTargetToCursor script to learn Python but also to try and make a cross-platform version of the...

View Article

Scripting Python to add circles to rectangle vertices

Hi there, I’m very new to python scripting and I haven’t had a lot of time to get to learn it. I’m trying to add circles to the corners of a rectangle but I’d like to be able to do it without the user...

View Article

Comment/uncomment multiple code

I’m trying to use the command ⌘+/ to comment/uncomment multiple lines of code in Python /rhino Mac, but it doesn’t work. Any suggestion? Thanks, Roy 1 post - 1 participant Read full topic

View Article


Python Fillet An Edge?

Fillet an Edge I want a simple python FilletEdge function like this: box = rs.AddBox(…) ## pretend 10x10x10 point_on_edge = [10, 10, 0] ## top right vertical edge. FilletEdge(box, point_on_edge, 2)...

View Article


Image may be NSFW.
Clik here to view.

Script Editor - can't find image path after publishing script to rhp

Hi there, I am just starting to use the script editor in Version 8 (8.3.24009.15002, 2024-01-09) on a Mac computer. My script is written in python and I want to get an rhp that I can share with...

View Article

Image may be NSFW.
Clik here to view.

rs.GetLinetype() error in V8

Running the following code: import rhinoscriptsyntax as rs lt_str=rs.GetLinetype() This brings up the linetype choice dialog. If you hit Cancel in V8, you get the following error: Message: 'NoneType'...

View Article

Custom Progress Bar in Rhino8 (Python/Threading/ETO)

(topic deleted by author) 1 post - 1 participant Read full topic

View Article

Image may be NSFW.
Clik here to view.

System.IO is missing DriveInfo in python2 (Rhino8)

If I start with the python 2 note, I get an error “System.IO object has no attribute DriveInfo” If I start with the python 3 note, the DriveInfo stuff is missing from the Intellisense but it compiles...

View Article


GUID , RhinoScriptSyntax in GHPython

I am a little bit confused. Some RhinoScriptSyntax functions only returns GUID, But Objects like points, curves created in Grasshopper don’t have GUID before baking. So, how come one can use functions...

View Article

Image may be NSFW.
Clik here to view.

Bug running script rhino 7 and 8

Hi every one we have found a bug with rhino script Our script run correctly if we run it with a script editor but he didn’t run correctly with a toolbar buton the problème is the name “emphasis” layer...

View Article


Image may be NSFW.
Clik here to view.

Script editor getting started

I am trying to get started with the new script editor but facing some issues, please see image: Show some error related to rhino and grasshopper libraries The time stamps in Rhino logs do not match my...

View Article

Is there an rs.createbrep function now?

Hi @piac Is there an rs.createbrep function now? I am currently using rs.coercebrep() and would like to switch if the CreateX is a better workflow I am referring to this thread:...

View Article


ReadFileVersion always returning -1

I want to get the Rhino version of the current file. Every file I try this on returns -1. Using V7. Any ideas? 4 posts - 3 participants Read full topic

View Article

RhinoCode ScripEditor for development of libraries

Hi, There are two key issues I have when developing python libraries and testing them on RhinoCode. I am using vscode and pip to install my local package to rhinocode python directory, since I am...

View Article

Point style and size

Hi there! Please, need help to AddPoint or DrawPoint (points) with a given style and size. Have this to color the point: import lor the point import scriptcontext as sc import rhinoscriptsyntax as rs...

View Article
Browsing all 5938 articles
Browse latest View live