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

Image may be NSFW.
Clik here to view.

Closing viewports

Hello, I wonder if there is any method for closing viewports? I have some scripts for cleaning and managing documents generated from some other models, like removing unwanted entities and so on. And...

View Article


Image may be NSFW.
Clik here to view.

Accessing the Texture Mapping Widget through Python?

Hi there, i’ve written a script that when you select a block the script recursively checks if the block is within another block then it keeps checking until it reaches the geometry level. I then apply...

View Article


Reading a CSV file on MAC - SOLVED

Hello, I am unable to use simple CSV python reader like the Rhino sample…: import csv import rhinoscriptsyntax as rs def CSVbuilding(): #prompt the user for a file to import filter = "CSV file...

View Article

Running Script Faster in V8

Hi guys, Is there any way to make this script run faster in Rhino 8? It runs a little slow when you have 30-40 layers like I do. This script randomizes all layer colors, excluding black. Thanks in...

View Article

Image may be NSFW.
Clik here to view.

Curve.OffsetTangentToSurface direction isn't predictable

Hello, I’m tinkering with a script that’s meant to create a custom ribbon around a 3D edge, for which I’m extruding a curve using the new Curve method OffsetTangentToSurface(Surface surface, Double...

View Article


Interacting with IGH_DocumentObject from Python (Rhino8)

Hi, I’m trying to set the value of a Number Slider using Rhino 8 in Grasshopper. I can do this successfully using a script component running Python2, but Python3 fails running the same code. It...

View Article

Read and add in a dictionary values from EXCEL

Hello, I actually have a python code to read and retrieve data values into a dictionary using import CSV and DictReader. Simple datas well organized of customers (name, email, phone…) It works great,...

View Article

Issue: layer attribute lost with rs.TransformObjects() on linked blocks

Hi There, There’s an issue with rs.TransformObjects() on referenced geometry. I use a script to recursively get all containing geometry from a block (in main.3dm), with nested linked blocks inside. I...

View Article


Mac R8 - SemiModalDialog crash

Hi there, a SemiModal Eto dialog crashes Rhino 8 for Mac (8.5.24032.06002,2024-02-01) Example script: ETO_SemiModalDialog.py (1.2 KB) Steps to repeat: From Tools > Script > Run choose the...

View Article


Python script batch export vector pdf - no wireframe issue

Hi There, How can I use the viewcapture.settings to print vector pdfs with the display styles like hidden line. All the pdfs are coming out wireframe. I would like to avoid raster printing. Cheers. 1...

View Article

Image may be NSFW.
Clik here to view.

Python script issue

Hello, I try to script my component in Python for GH. At the very beginning, I came across something odd, I provided a single Curve N1 in my script, and when trying to retrieve that Curve I got a...

View Article

Image may be NSFW.
Clik here to view.

Parameter needs GUID or string representing a GUID

Hello all! This is a dumb question - first time poster, I’m a beginner in python and gh-python, so apologies! There is a lot of refactoring to be made in this code, but for now I just want it to work...

View Article

Image may be NSFW.
Clik here to view.

Rhino.Python Get Key and Value

Hello to all, I am a beginner about Rhino Scripting so my issue is. I´d to get keys and values to variable. I used rs.getusertext but it took only keys to the variable. You can see at above the SS. it...

View Article


XZ Plane can't do data conversion from integer to point

First-time poster here. I have a school project in Grasshopper-Python. I’ve been getting an error message in my code that I’ve been trying to troubleshoot for days now, but I can’t figure it out. So,...

View Article

Loft: Vicarious argument deduced from default

First-day poster here. I have a school project in Grasshopper-Python. I’ve been getting an error message in my code that I’ve been trying to troubleshoot for days now, but I can’t figure it out. So,...

View Article


Image may be NSFW.
Clik here to view.

Rhino 8 Script Editor Bug?

Hi everyone. I’m encountering a weird bug inside the script editor(the one where you can access directly within Rhino). So, I wrote some python code in my second computer also in Rhino 8 and it works...

View Article

[Wish] Forward/back button in the script editor

Forward/back buttons in Visual Studio are extremely useful. It’d be nice if we could have similar buttons in the new script editor. (By the way, though the Python 3 editor is currently lacking...

View Article


Pip install playsound - Rhino8 Grasshopper?

Is it possible to install and use libraries such as playsound with GhPython component in Grasshopper 1 or 2 ? Thank you! 5 posts - 2 participants Read full topic

View Article

Os.getwd() returns wrong directory in Rhino8?

The code below returns the path to the folder containing the running script document in Rhino7, which is what I expect. In Rhino8, it returns C:\Program Files\Rhino 8\System (my script is not in that...

View Article

Selecting face at the end of a pipe

Hi, In python is there a way to select the end face of a pipe object in Rhino? 2 posts - 2 participants Read full topic

View Article
Browsing all 4146 articles
Browse latest View live