algorithmic modeling for Rhino
Tags:
When I tried to reworked this for RhinoCommon, like:
Sub AddText(ByVal P As Point3d, ByVal T As String, ByVal H As Double, ByVal F As String, ByVal S As Integer)
If (H <= 0) Then H = 1.0
If (String.IsNullOrEmpty(F)) Then F = "Arial"
If (S < 0 Or S > 3) Then S = 0
Dim plane As New Plane
plane.Origin = P
Dim text_entity As New TextEntity()
text_entity.TextHeight = H
text_entity.Text = T
text_entity.Plane = plane
Dim bold As Boolean = False
If (S = 1 Or S = 3) Then bold = True
Dim italic As Boolean = False
If (S = 2 Or S = 3) Then italic = True
Dim idx As Integer = RhinoDocument.Fonts.FindOrCreate(F, bold, italic)
text_entity.FontIndex = idx
RhinoDocument.Objects.AddText(text_entity)
The Text seems to be created. I can select it in Rhino, but I do not see it. What am I missing?
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by