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

Image may be NSFW.
Clik here to view.

Rhino Python Editor: No module named Grasshopper

Hi all, My Rhino Python Editor can no longer import the Grasshopper module. I wrote a little script (script A) that opens grasshopper files from Python. import rhinoscriptsyntax as rs import...

View Article


Image may be NSFW.
Clik here to view.

Extruction of a list of a 3D curves

Hello all, could you please help me? I’m trying to create a ramp that consists of different tiles. Part of the assignment is to integrate python code. Lately I have succeeded to create a 3D surface of...

View Article


Bug Report: Adding detail to Layout crashes Rhino (Python)

Hi fellow Rhino users and Developers, trying to automate a boring task I have found what I believe is a bug in rhino. The following script starts Grasshopper, loads a script and bakes an object. That...

View Article

Image may be NSFW.
Clik here to view.

Rebuilding mesh normals by python code

Hello, I want to rebuild mesh normals for a stripped morphology of meshes in grasshopper. I saw a script that used C# script to do this. Can I do the same in grasshopper python? I am writing a...

View Article

Help: speed smooth a mesh as fast as -Smooth

I am trying to smooth a mesh X number of times, but if I loop it in Rhino Common then it is much slower than Rhino’s Smooth command, why is that, and can I improve it? import rhinoscriptsyntax as rs...

View Article


Azure Purview Support for Alteryx (APA) Platform

We are exploring Azure Purview and would like to know if there is any Third Party support for Alteryx - the Analytic Process Automation (APA) Platform? The doesn’t appear to any native support for...

View Article

How to press Escape key in the script

Is there a “utility” command like “_Enter”, “Pause”, but for the escape key (e.g. “_Escape”). I’m trying to get this script to work, but in the last line “-NamedCplane” command still waits for input...

View Article

How to modify contents of 3dm files without opening a new Rhino instance?

This thread from two years ago suggests that the only way to modify entities of 3dm files is removing the old ones and adding new ones - however I’m not sure if that wouldn’t break methods that rely...

View Article


Image may be NSFW.
Clik here to view.

Is it possible to pass arguments to RunPythonScript?

I’m trying to spawn multiple Rhino instances with a python script and make them load the same script that started them, but run it differently. I thought that it can be achieved by passing arguments...

View Article


Image may be NSFW.
Clik here to view.

DisplayText property of Text objects returns Text Field (aka )

I’m trying to format file names using named Text Objects on Layout pages - unfortunately it breaks if text fields are used in text objects (e.g. %<PageName()>% or custom fields in Document User...

View Article

Best way to reduce file size in terms of display performance?

I’m trying to optimize a heavy Rhino scene by breaking it into linked blocks and creating their proxies, that is smaller versions that show only the most distinctive features and load the full blocks...

View Article

How to modify Block Update Type "the right way"?

This works: sc.doc.InstanceDefinitions.ModifySourceArchive(block_instance.InstanceDefinition.Index, block_instance.InstanceDefinition.SourceArchive,...

View Article

Can you add User Text to Block Definition?

rs.SetUserText(block_definition_id, "key", "value") gave this error: Message: 9d0ecdd8-b3ad-4d9d-80bb-020002811910 does not exist in ObjectTable Some context: I’m trying to add “Edit in place”...

View Article


Image may be NSFW.
Clik here to view.

Pop up when calling "BlockEdit" in python script

Calling BlockEdit command from a Python script results in this warning. Is there any workaround to avoid it? import rhinoscriptsyntax as rs rs.Command("BlockEdit") 1 post - 1 participant Read full topic

View Article

Where is the _SubCrv

Hello, I have tried to make the simplest of scripts that would make a subcurve as long as another curve. Main issue is that I can´t find any SubCrv method. Tried working around it with rs.Command to...

View Article


Gh-python-remote

Hi everyone, I am trying to install gh-python-remote following the steps in gh-python-remote · PyPI . But I got stuck at this ``` python -m ghpythonremote._configure_ironpython_installation Error is...

View Article

GetObject weird behavior

Hi, Weird behavior of Rhino.Input.Custom.GetObject in python. If I run this : import Rhino # def getObject() : go = Rhino.Input.Custom.GetObject() go.Get() if go.CommandResult() !=...

View Article


How to control camera clipping plane?

I’ve noticed that rhino’s camera’s near plane may behave strangely on larger models, which made me wonder if it can be controlled. I’ve tried it via the following script borrowed from this thread, but...

View Article

Image may be NSFW.
Clik here to view.

Objects User Text (User String)

Hi everyone, I’m tring to read and write user text in CSharp , I searched a lot but there’s no easy explanation about… I would like to know in which namespace and which exactly method shoud I call to...

View Article

Cplane vs World Coordinates

Hi, This seems like a very basic question but for some reason I cannot find the right answer on this forum. my problem is as follows: I want to draw geometry using rhinoscriptsyntax addpoints() and...

View Article
Browsing all 5938 articles
Browse latest View live