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

ERROR expected ObjRef, got CurveObject

$
0
0
import Rhino
import scriptcontext
import System
import Rhino.UI
import Eto.Drawing as drawing
import Eto.Forms as forms
import rhinoscriptsyntax as  rs
layer_names = rs.LayerNames()
layer_objects = list(layer for layer in scriptcontext.doc.Layers if not layer.IsDeleted)
for name in layer_names:
    layer_obj = None
    for layer_obj in layer_objects:
        if layer_obj.FullPath == "MCS":
            autoMCS = scriptcontext.doc.Objects.FindByLayer(layer_obj)
            rs.ConvertCurveToPolyline (autoMCS[0], 0.1, 0.1, True, 1, 5)

TEST.3dm (49.9 KB).

4 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 4148

Trending Articles