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

Can you write a script to save a selection but not as a group?

I want to set Scenes in rhino so when I click a named view it automatically hides a saved selection. 2 posts - 2 participants Read full topic

View Article


Json module python

Hi, is there a module in python to handle json or do i have to install one ?. Thanks in advanced 2 posts - 1 participant Read full topic

View Article


Image may be NSFW.
Clik here to view.

AddSrfSectionCrvs works within RhinoScript, but not within Excel VBA

Hi, I am trying to use AddSrfSectionCrvs by calling it thru Excel VBA. Below are two identical codes for making a section from a cube (One within RhinoScript and another accessing RhinoScript thru...

View Article

Image may be NSFW.
Clik here to view.

rs.CurveDirectionsMatch issue

Hello, I’ve been writing a script that use python CurveDirectionsMatch function to align the curve directions and I ran into an issue - when I have co-linear lines then the above mentioned function...

View Article

Image may be NSFW.
Clik here to view.

Display and print UV dimension?

Hi, is there a way to display a mesh UV dimension via script? Example: I’ve unrolled a mesh and gave it a known UV dimension (60x60 mm) image982×970 93.4 KB Is there a way to retrieve this value on...

View Article


Sorted one list as an other list

how can i sort one list with the same sort of an another… i make like this: dim=[5,98,56] dir=['a','c','b'] for i in range (0,len(dim): dimdir.append([dim[i],dir[i]]) sorted_dimdir=sorted(dimdir,...

View Article

Add new User Attribute Text key

In Rhinopython I’m trying to add a new key-value pair in the Attribute User Text. I hoped rhinoscriptsyntax.SetUserText(object_id, key, value=None, attach_to_geometry=False) would be able to make a...

View Article

Image may be NSFW.
Clik here to view.

Add prefix to file materials

Dear all, i’m new to scripting in rhino and don’t know the right syntax yet. Perhaps someone could help with one inconvenience. I like to work with worksessions, but i am really bad in properly...

View Article


Image may be NSFW.
Clik here to view.

How to get the names of the Python functions in the call stack?

Hi all I am looking for a way to get the name of a Python function from inside the function. I tried by the inspect module, callin the stack() function … import inspect def f1(): s = inspect.stack()...

View Article


Automating Rhino

Hello, I’ve recently been looking at automating Rhino operations in order to assist in automated testing of our Rhino plugin. I was wondering if there is a recommended way to inspect the internal...

View Article

Image may be NSFW.
Clik here to view.

Add prefix to material names via script

Dear all, i’m new to scripting in rhino and don’t know the right syntax yet. Perhaps someone could help with one inconvenience. I like to work with worksessions, but i am really bad in properly...

View Article

Image may be NSFW.
Clik here to view.

Eto - TreeGridView - basic questions

Hi @curtisw, @dale, i’ve collected a few basic questions for using the Eto.Forms.TreeGridView: How can i control to which column the litle black triangle is assigned to collapse / expand a...

View Article

More complex dialog

Is there a way to create complex dialogs in Rhinoscript? The functionality of Rhino.CheckListBox and its cousins is great, but sometimes I just need to create my own dialog to do something unique. 7...

View Article


Assigning a Macro to a Keyboard Shortcut

Perhaps I am approaching this the wrong way - alas I still haven’t got to grips with scripting yet. Ultimately I am better versed in writing Macros, and I’d like to bind a list of simple commands to a...

View Article

Invoke a third-party command-line tool with arguments from GHPython?

Hi, I’m trying to run a shell command with arguments (i.e. cmd = "tool -i -o -e "file.txt") from GHPython in Rhino 6 for Mac to post-process some files! tool is a third-part command-line tool. I’ve...

View Article


Blend Curve on python

Hi, I’m learning how to code in Rhino and I would like to know how I can flip a curve using AddBlendCurve ? I’m programming a script that takes a txt file and returns the lines of a boat, and I need...

View Article

Image may be NSFW.
Clik here to view.

RhinoScript FORMAT function

Is there a RhinoScript text FORMAT function like in VBA, as in the following Microsoft page:...

View Article


IronPython and shell subprocesses? Windows and macOS inconsistencies?

Hi, Why is that on Windows, you can directly use executables - that have been enabled for shell use, with an environment path -, in an IronPython subprocess ( e.g. subprocess.Popen(["mytool", ...]) )?...

View Article

rs.GetObject / Rhinocommon Gets

If you do the following: get = rs.GetObject( “Pick”, rs.filter.polysurface | rs.filter.surface) Why does rs.filter.polysurface | rs.filter.surface work, in terms of that style / notation, for being...

View Article

Shortest Route to BrepFace from Gets

How, from a single pick, would you most efficiently get the Face in the Brep which you clicked on? The best I could come up with was below, knowing that there is going to be a way which is elegant...

View Article
Browsing all 5793 articles
Browse latest View live