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

Image may be NSFW.
Clik here to view.

LineCurve casts to PolylineCurve

Hi, I’m experiencing some strange behavior where a LineCurve object is changed to a PolylineCurve object when moving the control points for the line. Is this the intended behavior? The line is still...

View Article


Can't access the imported object (python)

Below is the code snippet giving me problems. The object loads, but I can’t access the guid in that last statement (I get an index out of range error as if there were no objects in the document, but...

View Article


How to add a filter to an Eto.Form.SaveFileDialog()

I’m running into an issue when trying to add a Filter to an Eto.Form.SaveFileDialog() with the code below I don’t get the filter applied to the dialog box import Eto.Forms as forms import Rhino.UI as...

View Article

Is GetMultiple() returning a wrong value?

Hello! Could you please run this short script: import Rhino go = Rhino.Input.Custom.GetObject() go.GetMultiple(0, 0) result = go.CommandResult() print result Even if I press ENTER or SPACE, ‘Cancel’...

View Article

Export Scheme From Headless document

I’m unable to specify the scheme when exporting from and headless document. When I execute the following code : Using HeadlessDoc = RhinoDoc.CreateHeadless(Nothing) RhinoDoc.ActiveDoc = HeadlessDoc...

View Article


Image may be NSFW.
Clik here to view.

Unable to load points from hops component

drawing.py (3.6 KB) Hi everyone! I’ve been quite stumped, I am creating a list of points dirived from a 2d ‘drawing’ using tkinter. This works fine and I’m able to get a list of points from it. (like...

View Article

Image may be NSFW.
Clik here to view.

Random adjacent tiles script is selecting repeats

Hello all I’m trying to create a series of adjacent tiles from a grid. The intended result is a snake-like formation. (The ultimate result would be a subdivision of this grid into as many as possible...

View Article

doc.Objects.Delete how to delete PolylineCurve

I must be missing something obvious but I cant seem to figure it out. I would like to split a line into two curves then delete the shorter of the two. When it comes time to delete the polylinecurve I...

View Article


Python / EndOpenDocument triggered on paste?

Hi, I wonder why ? Run the script which register a dummy event handler on EndOpenDocument. Create an object (e.g. circle) Cut and paste it. Dummy event handler is triggered and prints its name. If it...

View Article


BlockInstanceName not working

Learning to use RhinoCommon, I’m trying to use Rhino.RunTime.TextFields.BlockInstanceName(). Haven’t found a way to make it work. This is the simplest version of what I’m trying to get: import Rhino...

View Article

Image may be NSFW.
Clik here to view.

ScriptEditor: Cannot import numpy -- Rhino 8 Beta

Hi there! I tired to import numpy in Rhino BETA (Script editor) and there is error in “importing numpy” Please see the attached screenshot for the reference. 3 posts - 2 participants Read full topic

View Article

Image may be NSFW.
Clik here to view.

Problem with selecting path for the "Tree Branch" command in Python

Hi guys, In the picture bellow the “bb = krefter” tree is shown in the panel to the left. What do I need to put in the command x = gh.TreeBranch(bb, ???) to get the path (0,1)? Berg - Mesh_v8_kurs.gh...

View Article

How to add text alignment to Python Script

import rhinoscriptsyntax as rs # Get all text objects in the DWG file all_objects = rs.AllObjects() text_objects = [obj for obj in all_objects if rs.ObjectType(obj) == rs.filter.annotation] # Loop...

View Article


How to run a GHPython infinite while loop with Timer

Dear all, The below function is not exiting automatically after 3 seconds. I am unable to figure out the error. import rhinoscriptsyntax as rs import time def runFunction(Run): count = 0 while Run:...

View Article

Image may be NSFW.
Clik here to view.

Create a new layer naming issue via a python script

I love how I can run the alias that calls this script and just type in the name…just so long as it is one word. Is there any way to modify this script so that pressing the tab key when entering a name...

View Article


Access to Current Value of ric.GetObject.AddOptionList

Greetings. Through EditPythonScript within Rhino 7, I added an option which consists of 3 options while providing possibility for curve selection. I am further able to reach out to these options and...

View Article

Use Ironpython in Rhino8

Hello, How can I make my Python scripts work on Rhino8? They are written using Ironpython, since they are supposed to work on Rhino6/7. I would like to force Rhino8 to use Ironpython as well, without...

View Article


-viewCaptureToFile strange beahvior

Hi, I’m using python’s rs.command() in Grasshopper to automate some viewCaptureToFile exports. I seem to have everything setup properly, and Rhino’s Command line gets all the way to Save file name (...

View Article

Pls help with batch

You have a batch script, but it’s not perfect. You need it to delete everything except the specified paths, but it currently deletes everything. How can it be modified to delete everything except...

View Article

Rhino 8 Script editor question

hello, is there a short cut for formatting the code (auto indentation) ? (i’m on Windows) thx 1 post - 1 participant Read full topic

View Article
Browsing all 5938 articles
Browse latest View live