Grasshopper

algorithmic modeling for Rhino

Hi,

I am using a vb component to read out the guid-name.

Everytime I reopen the file I have to exchange the component with a new one ffrom the panel. Is there a way to avoid this? (Destroy cache, doesn´t work)

using this:

 Private Sub RunScript(ByVal id As Guid, ByRef name As Object)
    Dim obj As Rhino.DocObjects.RhinoObject = doc.Objects.Find(id)
    If (obj Is Nothing) Then
      name = "not found"
    Else
      name = obj.Attributes.Name
    End If
  End Sub

Thanks,

Phillip

Views: 213

Attachments:

Replies to This Discussion

Does reconnecting the input trigger it to work properly?

nope. only exchanging with a new one.

yes, latest gh-version.

Ok this only, if the definition has been saved with referenced objects and the objects are not (yet) in the current file. Then, if you want to rereference, the problems occurs.

If you save and load the file unreferenced, it works as usual.

RSS

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