Grasshopper

algorithmic modeling for Rhino

Hello. I have a problem when I'm trying to convert a guid to curve. If I do it outside of the cluster everything works fine. But if i do it inside geometry stops updating when I interact with it in Rhino viewport. Does anyone know the reason?

Here is a script:

Private Sub RunScript(ByVal layer As String, ByRef A As Object)

Dim layer_index As Int32 = doc.Layers.Find(layer, True)
If (layer_index < 0) Then
layer_index = RhinoDoc.ActiveDoc.Layers.Add(layer, Drawing.Color.Black)
RhinoDoc.ActiveDoc.Layers.SetCurrentLayerIndex(layer_index, 0)
End If

Dim lay As Rhino.DocObjects.Layer = doc.Layers(layer_index)
Dim objs As Rhino.DocObjects.RhinoObject() = doc.Objects.FindByLayer(lay)
If (objs Is Nothing) Then Return

Dim geo As New List(Of System.Guid)
For Each obj As Rhino.DocObjects.RhinoObject In objs
geo.Add(obj.Id)
Next

A = geo

End Sub

Views: 170

Attachments:

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service