algorithmic modeling for Rhino
the problem is this:
Instances.ActiveCanvas.InstantiateNewObject(panel.ComponentGuid, "Test", attachmentpoint, False)
You're using the overload which takes an ID, but that one creates its own instance of GH_Panel because it doesn't know you've already made a panel of your own.
''1. Declare the bounds component as GH_component
Dim lastComponent As IGH_Component = TryCast( actdoc.Objects.item(1), IGH_Component)
If (lastComponent Is Nothing) Then Return''2. Declare the upper Input as IGH_Param
Dim lastParam As IGH_Param = lastComponent.Params.Input(0)''3. Create a New Panel At Point 0,0
Dim panel As New Special.GH_Panel()
Dim attachmentpoint As New PointF
attachmentpoint.X = 0
attachmentpoint.Y = 0
Instances.ActiveCanvas.InstantiateNewObject(panel, "Test", attachmentpoint, False)''4.Create a Connection between this two components( bounds(input(0)) and panel(output))
lastParam.AddSource(panel)
--
David Rutten
david@mcneel.com
Poprad, Slovakia
Thx a lot
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by