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

Rename all layer names with Uppercase

Hello all, I m trying to create a python script which will turn all layer names to uppercase When sublayers exist i get the following error Message: 0000_REFERENCE::0001_frameline does not exist in...

View Article


Image may be NSFW.
Clik here to view.

Grasshopper python: find the corresponding value in the dictionary

Sorry, I am a new user of rhino grasshopper python. I have a question about wanting to write cement on the panel and find the corresponding value in the dictionary. How can I write it down?...

View Article


Image may be NSFW.
Clik here to view.

GhPython count lines by length

I’m trying to make a Python script that counts a a set of lines according to their length (e.g. 2 lines < 3’-0", 5 lines between 3’ and 4’ etc.) 5 posts - 2 participants Read full topic

View Article

Help moving objects along the Z plane

Hello, Very new to scripting but have been using rhino for over 10 years now. Im working through building out simple geometry to try to gain a better understanding of Python and scripting. Below is a...

View Article

Temporary Split with CutPlane

Hello All, I m trying to create an enchanced split command by using temporary cutplanes import rhinoscriptsyntax as rs objs = rs.GetObjects("Select objects for cut plane") if objs: point0 =...

View Article


Image may be NSFW.
Clik here to view.

Delete All Breps that are below a surface level

Hi All, I m trying to figure out how to manage and delete the surfaces that are under a plane So far i have managed to do with a constant height but comparing the Z value of the Area Centroid with a...

View Article

Pressing a button in an ETO form crashes rhino

I have a very basic ETO form with a single button which when pressed should print some text. Pressing the button crashes rhino. import Rhino import Eto.Drawing as drawing import Eto.Forms as forms...

View Article

Creating c# project from script compiler

Hello, can someone explain how to import c# source code from script compiler into visual studio. I use rhino 7 built in script compiler to generate c# source of my python plugin. What is the procedure...

View Article


Script to Label Points Z coordinate with Cross and Text

Hello All, Seeking a script that achieves the following: Labels single or multiple points with Z Value (including selecting a group of points) Inserts a ‘cross’ block at point’s coordinate Prompts...

View Article


Image may be NSFW.
Clik here to view.

Split function works manually, but not when using Python

I used the following code to create two swept splines and intend to split them, to later join the non-intersecting parts (basically a union of the fibres, but rs.BooleanUnion wouldn’t work): import...

View Article

Wish - StringBox() can accept/return an empty string

So that when someone simply presses Enter without entering anything in the box it returns an empty string. Hitting Esc or the Cancel button should still return None. Right now, it simply refuses to...

View Article

Python Print Settings

Just want to preface by saying that this is my first experience with doing something like this, I’ve done some fairly extensive GH definitions so I get the logic but wrapping my head around...

View Article

Connecting to an Access database with Python

I’ve been Googling how to do this but still unsure of the best way to do it. Yes I should probably use something else, but it’s a fairly simple database. I did once, years ago, connect RhinoScript to...

View Article


Set Panel Content via Rhino Script Python

Hello community, I’am trying to set a panel content via Rhino Script in Python. I know the panel ID but I dont know the syntax to write content inside the panel. This is what I was trying in Python...

View Article

How to have a list of all open Rhino windows?

I use Rhino 5 and mainly python scripting but also RhinoCommon. This would be exactly what i am looking for, but i can’t find it won’t accept a line like: import Rhino Rhino.RhinoDoc.OpenDocuments...

View Article


Point coordinates to collect and store in dictionary using python

hi, I am struggling with some task. I need to collect with a python script some point coordinates of a object which I have set onto the object. now my little script in python ask to select points in...

View Article

Image may be NSFW.
Clik here to view.

Help to created Custom Preview in python(c#)

help to created Custom Preview in python(c#) i try it but not work! custum preview python.gh (4.5 KB) custum preview python1153×690 87.2 KB import ghpythonlib.components as gh a=gh.CustomPreview(g,s)...

View Article


Quick and Dirty Copy GUID to Clipboard

G’day all, Just a quick and dirty tool to copy a curves guid to clipboard as text. Useful for quickly amending copied text fields to reference a new curve, rather than using What on the curve. import...

View Article

Python point formatting using {}.format and non-English locales

I just stumbled on this so I thought I would post it in case anyone finds it useful. I have a script that the user will pick a point on an existing curve, later that point needs to be converted into a...

View Article

Fast Mesh Ray intersection

I have large mesh, and a long list of rays (millions). I need to know if the rays hit any part of the mesh. Got this working in Python RhinoCommon with Intersect.Intersection.MeshRay. I am looking for...

View Article
Browsing all 5823 articles
Browse latest View live