Grasshopper

algorithmic modeling for Rhino

Hi I was playing around with David's EventsExample which opens up a windows form in grasshopper through a vb component (I've tried to search for that discussion in the vb.net forum but I cannot seem to find it anymore).

 Is it possible for data in grasshopper to be displayed in the windows form. For example, can a string ("Hello World") fed into a vb component be displayed in the form's textbox/ richtextbox. Thanks.

Views: 369

Replies to This Discussion

Hi Jason,

if the VB component has an instance of this window, then you can change the contents of the window. Just make sure the window instance is stored as a static variable. Something like the following:

Private Shared m_window As MySpecialDialog

Public Sub RunScript(ByVal sText As String, blahblahblah)
If (m_window Is Nothing) Then
m_window = New MySpecialDialog()
m_window.Show(RMA.Rhino.RhUtil.RhinoApp().MainWnd())
End If

m_window.lblTheLabel.Text = sText
End Sub


--
David Rutten
david@mcneel.com
Poprad, Slovakia
David,
thank you

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service