Dear all,I have a small problem with calling Rhino commands into GH through VBScript components (the commands are Rhino.GetUserText and Rhino.SetUserText).
The main goal of my application would be an automatic filling process of additional information to 3D geometry (for interoperability purposes).
Searching information I found this discussion:
...where Vicente Soler suggests a simple method which calls a command from Rhino into GH. I discovered, talking with Vicente that now the language to use is RhinoCommons but I didn't still reached a solution, being a dummie for scripting.
Does anybody can help me with this problem?
Here's the code that I'm trying to implement (it is written in RhinoScript actually):
Private Sub RunScript(ByVal x As Object, ByVal y As Object, ByVal z As Object, ByVal idObject As Object, ByRef A As Object)
Dim sIfcType, strObject
Dim strIfcColumn, strIfcBeam
sIfcType = Rhino.GetUserText(idObject, "TypeObjetIFC")
If ((sIfcType = "IfcBeam") Or (sIfcType = "IfcColumn")) Then
'MsgBox "median = " & y & ", min = " & x& ", max =" & z
Rhino.SetUserText(idObject, "Longueur", z)
Rhino.SetUserText(idObject, "Largeur", x)
Rhino.SetUserText(idObject, "Hauteur", y)
End If
End Sub
I just would like to add extra-information to a selected list of 3D geometries by managing the UserText data.
Thanking you in advance for your attention I'll wait for an your answer about this theme.
Sincerely,
Matteo