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

RhinoApp.WriteLine is sometimes very slow

No logs, no error messages, and nothing special about the log itself, sometimes it can take up to three seconds to write a log. Any ideas for investigation? 4 posts - 2 participants Read full topic

View Article


ExtractPreviewImage() argument number error using rhinoscriptsyntax

I am trying to use ExtractPreviewImage in a Python script but don’t understand the errors I see regarding the number of arguments. With rs.ExtractPreviewImage(“test.png”) I get the error: Message:...

View Article


Image may be NSFW.
Clik here to view.

Relationship between points

In the image the black points are static and do not move, I now want to find the X,Y,Z differences between each pair of red and black points, so far so good. Now I want to move the red points and I...

View Article

Select everything that is inside a specific layer

Good Morning, Please can someone help me how I can devin by Script: Select everything that is inside a specific layer, indicating only the layer name, without having to click on the screen? Grateful,...

View Article

Divide curve by ratio in Python Rhinoscript

Hi, can someone please help me in writing python code to divide a curve length by ratio? I want to divide a line and have points at 10%, 25%, 25%, 30%, and 10% of the total length. 4 posts - 3...

View Article


Image may be NSFW.
Clik here to view.

Using Linq in C# scripting component

Hi, In the latest Rhino 8 WIP, the C# scripting component doesn’t seem like recognizing the ‘using’ statement complaining about the missing reference. 8 posts - 2 participants Read full topic

View Article

Rhino Python help

Hi, I’m making a script to produce these objects inside a closed curve boundary. It keeps giving me error Message : Parameter must be a Guid or string representing a Guid. import rhinoscriptsyntax as...

View Article

How to delete a face from a Brep and another question

Simply draw a Brep in Rhino, a cube, and run the following code var rhinoObject = doc.Objects.OfType<BrepObject>().FirstOrDefault(); rhinoObject.BrepGeometry.Faces.RemoveAt(0);...

View Article


Change size png in code?

Hi everyone is there code(script) ( c#api)or plugin To change size of the all png images file in one folder{for example for icon component pixel or 32×32 pixel and other size…) ? Without decreases...

View Article


Python Looping Through List

Hi, this is a fairly basic python question but I’m trying to get my code to select all of the curves stored in a list and I’m getting this error message: “Message: iteration over non-sequence of type...

View Article

When is a GUID created

I would be grateful if someone could explain when a GUID is created…I understand any GetObject will create one but does the resulting creation inn a script have one ? For example, if I have a...

View Article

Image may be NSFW.
Clik here to view.

How to set frustum

Hello, I am trying to use SetFrustum, but it doesn’t work ,anyone who can help me, thank you! import rhinoscriptsyntax as rs import Rhino import re views =...

View Article

scriptcontext.doc.Create fail

Hi there, i am trying to close the active document and open a new empty document without providing a template. Both fails under Rhino 7 for Mac SR 7.17. The script to open a new empty document, which...

View Article


Image may be NSFW.
Clik here to view.

Sc.sticky has a limit of 100 items

Hello I am writing a Agent based script to replicate human evacuation from a building. For building the script I have to use sticky dictionary to calculate the previous location of the agent (human)...

View Article

Image may be NSFW.
Clik here to view.

Change Rhino Template path for multiple users in Windows

How can I create a script to change the Rhino Template path for multiple users in Windows? I will create a template for my company and I want to deploy it for multiple users. The new Rhino Template...

View Article


Scripting to automate rhino workflow for Texturing

Hello everyone! I would like to consider automating my rhino a little bit to speed up my workflow, my first idea was to create a script that automatically selects all the layers and assign a random...

View Article

Wide strings in Rhino script doesn't work as intended

Hello devs! I have this code below: std::wstring stdwstr(stdstr.begin(), stdstr.end()); ON_wString script; script.Format(L"_-Open \"%ls\" _Enter", stdwstr.c_str());...

View Article


Image may be NSFW.
Clik here to view.

Center Points Distance-Python

Python_test.gh (17.9 KB) import rhinoscriptsyntax as rs curve1 = curve[0] for curve2 in curve: c1 = rs.CurveAreaCentroid(curve1) c2 = rs.CurveAreaCentroid(curve2) dist =rs.Distance(c1,c2) Hello,I was...

View Article

Cannot set DisplayPipelineAttributes.ShowCurves Property

Hi @dale, i am trying to enable ShowCurves in the DisplayPipelineAttributes of the current displaymode (Rendered) using below code: import Rhino import scriptcontext import rhinoscriptsyntax as rs def...

View Article

Image may be NSFW.
Clik here to view.

Remapped number script

Hello friends I needed to have the script of this algorithm in Python. I searched the forum but did not find anything. Is there anyone to write this simple script. I need to know how this algorithm...

View Article
Browsing all 5793 articles
Browse latest View live