generative modeling for Rhino
Tags: Grasshopper, Model, Terrain, via
Permalink Reply by Simon Kallioinen on June 9, 2010 at 1:21am
Permalink Reply by Thomas Bildsøe on July 13, 2010 at 6:38am
Permalink Reply by Lance van Maanen on February 13, 2011 at 4:58pm
Permalink Reply by Vicente Soler on March 8, 2012 at 7:23pm Sorry I just saw this, one year too late. In case anyone else needs it, the code is the following:
Dim objref As New docobjects.ObjRef(x)
Dim txt As TextEntity = objref.TextEntity
Dim z As String = system.Text.RegularExpressions.Regex.Replace(txt.text, "[^0-9.]", String.Empty)
a = New point3d(txt.Plane.OriginX, txt.Plane.OriginY, z)
This works when the decimal separator is a point, if it's a comma replace [^0-9.] with [^0-9,]
Permalink Reply by Steen Hargus on January 7, 2013 at 1:26am Hi Vicente,
I have been following this script from day one and just realized that You had updated it to only accept numeric input! Thank You for that.
That makes this little tool even more productive!
Permalink Reply by Vicente Soler on March 8, 2012 at 7:39am I was asked to update this script so it works in the current GH version.
It works in the following way:
Place an ID parameter, reference the text objects in this parameter, place a vb component, right click on the x input and set the type hint to GUID, connect the ID parameter to the x input. Double click on the VB component and paste the following code:
Dim objref As New docobjects.ObjRef(x)
Dim txt As TextEntity = objref.TextEntity
a = New point3d(txt.Plane.OriginX, txt.Plane.OriginY, txt.Text)
Permalink Reply by MtoM on November 20, 2012 at 8:22pm Hi Vincente, I am wondering if we can update this thread so the script/components work in the latest GH version? The VB Component doesn't contain an option for 'GUID' under 'type hint'. That might be the reason I can't get it to work. My files are below.
Thank you!
Mike
Mike
Make sure you are not using the VB Legacy component
I used the VB Script component instead as it has GUID support (Grasshopper version used 0.9.0014) the original code from Vincente works really well
Regards
Andrew
Added by David Stasiuk 0 Comments 4 Likes
Added by stefano 4 Comments 6 Likes
© 2013 Created by Scott Davidson.
Powered by