Grasshopper

algorithmic modeling for Rhino

I have gotten as far as displaying a windows forms dialogue box from a appended menu item. I am not sure how to gather data that is input into the form, and insert that information into the custom component.

Public Sub ShowForm() As Double

Dim myForm As New Form1
myForm.ShowDialog()
Dim input As New Double
If myForm.ApplyBtn.DialogResult = DialogResult.OK Then
input = CDbl(myForm.TextBox1.Text)
Me.ExpireSolution(True)
End If

End Sub

Public Overrides Sub AppendAdditionalMenuItems(menu As Windows.Forms.ToolStripDropDown)
MyBase.AppendAdditionalMenuItems(menu)
Menu_AppendGenericMenuItem(menu, "Tiered Seating Settings", AddressOf Menu_MyCustomItemClicked)
End Sub

Private Sub Menu_MyCustomItemClicked(ByVal sender As Object, ByVal e As EventArgs)
ShowForm()
End Sub

Views: 350

Attachments:

Replies to This Discussion

Hi Pierre,

I can not help you unfortunately.

But I got interested in that component you are using. Is that a stadium generator component?
Where did you get it?

Thank you.

Yes it is a tiered seating algorithm built into a GH component. I have created the component, and am currently working out the bugs. I can not publicize it as of yet, as I am still perfecting the details. I will put it out once complete.

Understood.
Thank you for the reply, and I wish somebody will help you out with your problem.

I wrote a response to a similar question Pierre posted on the VB/C# forum.

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Sorry David,

I had initially posted in the wrong forum. Thank you for the response.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service