How to modify Block Update Type "the right way"?
This works: sc.doc.InstanceDefinitions.ModifySourceArchive(block_instance.InstanceDefinition.Index, block_instance.InstanceDefinition.SourceArchive,...
View ArticleCan 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 ArticlePop 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 ArticleWhere 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 ArticleGh-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 ArticleGetObject 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 ArticleHow 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 ArticleObjects 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 ArticleCplane 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 ArticleGet DocumentPath or DocumentName before file is saved?
I’m trying to reopen the same file via Python - it’s an autocad drawing that Rhino opens to use it as a base for generated geometry. However, I can’t seem to get document’s path or name without saving...
View ArticleName and add viewport + named viewport
Hi everyone, I would like to automate the creation of new viewports + named viewports. My usual process is: create floating viewport dock floating viewport create a cplane with 3Pt plan view to cplan...
View ArticleWould it be possible to specify export scheme in "Export" command?
It would be really helpful if there was an option either in the “Export” command or via any API (rhinoscript, RhinoCommon) to export selected objects to DWG via a specific Export Scheme (saved in a...
View ArticleIterating through groups of objects
I wrote a script that is working on a single selected group of curves. It’s for exporting nested sheets to dxf for CNC use. It copies the group, moves it to the origin, rotates, exports and then...
View ArticlePython, Select blocks that contain elements in a specific layer
Hello Everyone and @pascal . I’m trying to make a Python Script called “Kill Layer” the intent is to select a layer and delete all of it’s contents and then delete the layer itself. my biggest hurdle...
View ArticleHow to cancel UVEditor
Hi all, I finish the UVditor work, I know i can cancel or apply by manual method to press the cancel bottom. But I want to edit a python or script , I try to many script command ( Enter/cancel…)...
View ArticleHow to create a lightweight HUD to display information in the 3d viewport
I’m trying to write a script that displays information about the objects directly in the viewport. Is there a lightweight way to create such a Heads-Up-Display? Listing information in ListBox/Eto...
View ArticleHow to replicate EnableClippingPlane command in a script?
I can’t figure out how EnableClippingPlane and DisableClipping can be access from rhinoscript or RhinoCommon. I’ve see that there has been a new method provided in Rhino 6, but without an example I...
View ArticleGet customized macros or keyboard shortcuts programmatically
I try to pull my cunstomizations with a script ( s. the code below), but this returns only the default settings. Is it even possible? For aliases this is easily done with rs.AliasNames() I tend to...
View ArticleRhinoscriptsyntax.GetRectangle() is broken
Here is the Help for rs.GetRectangle(): So, supplying mode=0 as the first argument (or leaving it out) should enable “All modes”. However, there are no command line options offered (as the Rhino...
View ArticleGet name/id of the currently selected layer?
Is there any way to get name or id of the currently selected layer via RhinoCommon or rhinoscriptsyntax? 2 posts - 2 participants Read full topic
View Article