Thanks that helps a lot. I guess I had two questions, the first was how to return surfaces. The second was how to call the AddSurfaceObject method. I don't fully understand the vb.net implementation because inside grasshopper you don't have the context.m_doc object? What object does that method apply to? Hopefully that makes sense? thanks again for you help.
On Mar 13, 3:16 pm, David Rutten <[email protected]> wrote: > Hi Tim, > > if you want to output a list of surfaces from a scripting component, > do the following: > > ------------------------------------------------------------- > Dim srf As New List(Of OnSurface) > For i As Int32 = 0 To 99 > Dim n_srf As OnSurface = <call surface code here> > srf.Add(n_srf) > Next > A = srf > ------------------------------------------------------------- > > This code assumes you have an output parameter called A. > > -- > David Rutten > [email protected] > Robert McNeel & Associates > > On Mar 13, 8:27 pm, tim <[email protected]> wrote: > > > I am trying to do a custom subdivision of a surface with the vb.net > > component and then return a list of subsurfaces. I have referenced > > the VB.net sdk > > example:http://en.wiki.mcneel.com/default.aspx/McNeel/SdkPlaneSurface > > but am confused on the last part: > > > context.m_doc.AddSurfaceObject( ps ); > > context.m_doc.Redraw(); > > > Any help in returning a list of surfaces through the grasshopper > > component would be awesome or is this even possible?
