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

Python script made on Mac not working on Windows

I made a GH script that uses python to retrieve data from Google Sheets using code from one Erik Rood. It works with a piece of json code to give authorization to the Google Sheets that sits in the...

View Article


Update Points Update brep Vertex | Somewhere it fails

import rhinoscriptsyntax as rs import scriptcontext as sc import Rhino # Global variables to keep track of the Brep and point mappings brep_id = None brep = None vertex_point_ids = []...

View Article


Rhino commands with python 3?

Over the years I’ve created some useful python commands by following this tutorial. The other day I tried to use an f-string in my code and got some issues. I’d been using cpython3 heavily for rhino...

View Article

Script for exporting different geometries as separate .stl files

Hi! I’m a complete novice when it comes to scripting. I’ve tried using ChatGPT for help, but I end up with error no matter how much it tries to help me. I want to make a script or macro or something...

View Article

Python MAP Function

Hi, Can anyone please provide an example of using Python MAP function with a Rhino syntax command instead of a loop, tried and failed so need a little guidance. Something simple like a...

View Article


Bug - rs.BrowseForFolder() does not return focus to Rhino

rs.BrowseForFolder() does not automatically return the focus to the Rhino window once the folder has been chosen. If one has a method that asks for typing something at the command line - like...

View Article

Python interpreter being set to the Rhino executable path

Hello, I’m currently working with the Python 3 component in Grasshopper, but I’m facing an issue with the Python interpreter being set to the Rhino executable path (C:\Program Files\Rhino...

View Article

Image may be NSFW.
Clik here to view.

rs.MessageBox title bug

Hi there, is there a way to remove the “Rhino 8” text in the title of a rs.MessageBox ? the code used in above image looks like this: rc = rs.MessageBox("Message query text", 4+32, "Replace object ?")...

View Article


Rhinocommon Print Window Size to PDF

Hi, I have rectangles on the 3d model top view. These rectnagles are A4 paper size. I need to automatically print that A4 paper window using the corners from the rectangle. Now getting the corners...

View Article


Trying to access mesh in an Instance

I’m trying to access a geometry inside an instance, i can’t seem to find a way to get anything from instance.Geometry apart from : “AttributeError: ‘InstanceReferenceGeometry’ object has no attribute...

View Article

Mismatch between python and rhinoscript: copyobjects in group

Heyhello. I’m new to rhino and these forums so please do correct any mistakes. I’ve been trying my hand at scripting to lighten a part of my workload and found an odd mismatch between the output of...

View Article

ScriptEditor needs extra click when out of focus

great thanks @brian for the fix. but there are still some inconsistencies with focus for example with scriptEditor: @eirannejad Script Editor is showing Mouse-Over but does not react on mousedown: how...

View Article

Image may be NSFW.
Clik here to view.

Object Duplicate is NOT a real copy

This: Transform mirrorTransform = Transform.Mirror(Plane.WorldZX); GeometryBase mirroredGeometry = rhobj.Geometry.Duplicate(); mirroredGeometry.Transform(mirrorTransform); Is not really creating a...

View Article


Image may be NSFW.
Clik here to view.

Issue: FilePdf().AddPage() changes detail CameraLocation unexpectedly

Hi, I am creating .pdf files from a viewport using RhinoCommon API, but when I call FilePdf().AddPage() the detail CameraLocation (Z component) is different after the call than before. I would expect...

View Article

Is this even doable in Rhino Mac?

I have posted before explaining how I use a StreamDeck with Rhino 8 Mac to standardize my process of creating construction logistics. I choose to use a pair of StreamDeck devices but this process...

View Article


Image may be NSFW.
Clik here to view.

Read Blocks from Rhino

Hi all, I am trying to write a GhPython script that can read blocks from Rhino. But instead to return some format that grasshopper can read, it returns “Rhino.Geometry.InstanceReferenceGeometry”, I...

View Article

Using Modules unavailable in Rhino8 Python editor

Hi All, May I ask how do you import a module that’s currently unavailable? Is it possible to do pip install in Rhino Python Editor? The module I would like to use is Tkinter 7 posts - 2 participants...

View Article


Image may be NSFW.
Clik here to view.

Bug report: Rhino.Geometry.Curve.ProjectToPlane error with ArcCurve

I’ve got a wrong result when using Rhino.Geometry.Curve.ProjectToPlane on an ArcCurve. Here is a Rhino file: bug curve.3dm (41.1 KB) Here is the script: import Rhino import scriptcontext as sc def...

View Article

Python script to makes 2d, dimension and annotate

Hi, is there a python script that runs the make 2d command that then can also dimension and annotate the drawing ? Thanks 2 posts - 2 participants Read full topic

View Article

Image may be NSFW.
Clik here to view.

Flatten brush

Hi, I asked ChatGPT to create a flatten brush feature that I can use in the Rhino program. Currently, it works with a single click every time. The mesh objects can later be converted to SubD. AI +...

View Article
Browsing all 5938 articles
Browse latest View live