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

Python Script Advice

I’m new to Python scripting and managed to get together a few scripts that work, but I’m wondering if there might be a better way to implement them or if this is the way it should be done. If there is...

View Article


ShowColorDialog() returns transparency 00 in Rhino 7

In Rhino 5 and 6 the following code returns the selected color with transparency = FF. However, in Rhino 7 it returns the color with transparency 00. System.Drawing.Color new_color = new...

View Article


Image may be NSFW.
Clik here to view.

Issue: Enhanced Text Fields do not display document user data anymore

Hi there, I used to be able to set a value for document user data and use that value as an enhanced text field. However it does now display “####” Can anyone help me out? Thanks, Tim I use snippet...

View Article

Select / Pick Object in a detail within a layout

Hi all, I am using following code (LayerDot) to label (tag) the objects with textdots using layernames. As the code is used mostly on layout view, i need help for select/pick object in a detail within...

View Article

How to close messagebox by python script?

Hello I’m trying to create objects by using python scripts automatically. But python programs stop when a message box appears. Is there a way to close a message box automatically or not to show one? I...

View Article


Blocks and Scripts

I’m trying to figure out how I might be able to work with blocks in scripts and I’m not clear on what can and cannot be done. I know I can issue a BlockEdit, but is there some way I can change to one...

View Article

Adding events to specific objects

Is it possible to add an event handlers to a specific object, or can I only add the event to the document then when something changes check if the object that raised it is the one I want? The...

View Article

Get Object counts in Python Scripts

Is there a way to get the number of currently selected items into a python variable? Also Is there a way to get the number of items selected by rs.ObjectsByLayer() (not counting items that were...

View Article


Rhino8 Rhinocode can't use pandas

I installed pandas in rhinocode, but the following error prompt appears. Please help me! Error running script RC Exception: Traceback (most recent call last): File...

View Article


Image may be NSFW.
Clik here to view.

How to select bottom surfaces

Hello everyone I’m trying to develop a simple python plugin which draws a sort of “halo” around the bottom surface of a polysurface ( I’ll use that to avoid nesting objects too close to each other )...

View Article

Help Reading a file on mac is unable

I try to script the reading blocks inside a file to import them, but at th ebeginning I have no access to read my choosen file… Any help, I am sure it is just an option to allow me accessing it…...

View Article

Image may be NSFW.
Clik here to view.

Text with Frame

Hi all, I need help for creating a rectangle (RED) around text (PART 01) and trim the remaining part of the line (BLUE) inside this rectangle using python… The sketch is attached… Thank you in...

View Article

Brep.Split returns Runtime Error: Multiple targets could match

Heya! I’m quite new to scripting, trying to work with rhinocommon as exclusively as I can. Now I’m creating a circle in the center of a Brep and then trying to extend lines to cut that Brep, the split...

View Article


Sphere method in C#

Hi, I just started learning C# coding and I am trying to define a method that will create and grid of spheres but I get this error at the end: Error (CS0029): Cannot implicitly convert type...

View Article

Image may be NSFW.
Clik here to view.

Save as without dialog box?

Hello I try to save hatch using makeHatch plugin without display the dialog box, is that possible? import rhinoscriptsyntax as rs file = r"C:....../test.pat" command = "makeHatch X 1 Y 1 D 0.1 Enter...

View Article


How to add Landing property to a leader

Hi all, Is there any way to add “landing” property to a Leader created within a code with scripting? I am using a code; … … pts= pts.extend([pick_pt, point2]) leader = rs.AddLeader(pts,...

View Article

Transformation matrix of two different coordinate system

i need to create transformation matrix between two different coordinate system of two program how i can start with that ? 3 posts - 3 participants Read full topic

View Article


Image may be NSFW.
Clik here to view.

The script

please help only 1 scenario, mustache to link the edges together? 3 posts - 2 participants Read full topic

View Article

IronPython + PyArmor

Hello, I’m looking for a way to make my scripts more secure. In my research I ended up finding the PyArmor library. Tests on RhinoCode WIP version were successful using the script compiler together...

View Article

User Text is lost when using rs.Command("_Export")

Hello, When I explode blocks and export manually the User Text is maintained on the geometry. But when I use the script below all the User Text is deleted from the geometry contained within the block....

View Article
Browsing all 4140 articles
Browse latest View live