Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 5938

Scripting with SectionStyle

$
0
0

Hi,

I’m trying to understand what can be done with Section Styles, mainly with a view to automate the update of section style’s parameters.

As I understand from the RhinoCommon documentation, it is possible to create a SectionStyle object, that can then receive properties.

I get into trouble when trying to apply this SectionStyle to a layer. I’m trying to use the SetCustomSectionStyle method, but I think I’m missing something here.

What is the right way to do this? Thank you,

import Rhino
import scriptcontext as sc

# Creating the Section Style
section_style = Rhino.DocObjects.SectionStyle()
section_style.Name = "TestSectionStyle"
section_style.BoundaryVisible = False

# Applying the SectionStyle to a layer
layer = sc.doc.Layers.FindName("Layer 01")
layer.SetCustomSectionStyle(section_style)

3 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 5938

Trending Articles