Module Procedures
Dim frmTemp As New frmDiaPlacementOptions
Public Sub GetBaseSurface()
Dim getsurface As New RMA.Rhino.MRhinoGetObject
getsurface.SetCommandPrompt("Select Base Surface")
getsurface.SetGeometryFilter(RMA.Rhino.IRhinoGetObject.GEOMETRY_TYPE_FILTER.surface_object Or RMA.Rhino.IRhinoGetObject.GEOMETRY_TYPE_FILTER.polysrf_object)
getsurface.GetObjects(1, 1)
If (getsurface.CommandResult() <> IRhinoCommand.result.success) Then
Return
End If
frmTemp.txtBaseSurface.Text = getsurface.Object(0).m_uuid.ToString
frmTemp.txtBaseSurface.Refresh()
Return
End Sub
Why i am not able to set the ObjectID or any text to the textbox which is on my usercontrol
frmTemp.txtBaseSurface.Text = getsurface.Object(0).m_uuid.ToString
Should probably be frmTemp.txtBaseSurface.Text = getsurface.Object(0).m_uuid.ToString()
Do you mean that if you do a debug.print of frmTemp.txtBaseSurface.Text it doesn’t print out Louis?
Or do you mean that your form on the screen doesn’t change it’s display in the txtBaseSurface field to show Louis?
I’m thinking you are running up against VB’s not-real-intuitive way of handling data accessibility between modules and classes. Check out data definition properties like “Public”, “Shared”, “Friend”, “Partial”, etc. Data scoping can get tricky sometimes.
Found the way
I have placed some Variables in one Module
like if i want to set the text to text1 in form1 then first i set the value to variable in module like varText = “Louis” and then in form1 i put code text1.text = varText