Grasshopper

algorithmic modeling for Rhino

How to get the "text value" and "plane" of an annotation(text) object in rhino?

Hi all,
I need to get the "text value" and "plane" data of all annotations in a model.

(http://www.grasshopper3d.com/forum/topics/get-any-and-all-geometry-...)
I've already looked at the above thread, and learned how to get the objects from a particular layer. But I could only get their ids and I don't know how to transfer them to annotationbase to get the information I want.

here is my code:

  Dim textl As New List(Of Guid)
    Dim tg As IGH_Goo = Nothing

    For Each obj As Rhino.DocObjects.RhinoObject In doc.Objects
      Dim layer As Rhino.DocObjects.Layer = doc.Layers(obj.Attributes.LayerIndex)
      If (layer.Name.Equals(layername, Stringcomparison.Ordinal)) Then
        textl.Add(obj.Id)
      End If
    Next 


    Dim anno As New list(Of annotationbase)
   
    ids = textl
    stringOut = anno

===================

Thank you!
Chin-Yi Cheng

Views: 2637

Attachments:

Replies to This Discussion

Andrew's Human Plug-in will handle this.

http://www.grasshopper3d.com/group/human

Thank you! I'll try this! (but I probably still need to know how to do that in vb component...)

Sorry didn't see the VB, C# and Python Coding forum tag

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service