algorithmic modeling for Rhino
Hi
has anyone managed to use thir own custom class as an output parameter to a GH component?
I cant seem to do it and GH hangs after the pManage.Regsiter.Param method is called. Im running
0.6.0059.
Some psuedo code to get the ball rolling;
Namespace MyLibrary
Class MyClass
Inherits Grasshopper.Kernel.Types.GH_Goo
End Class
End Namespace
Now in the RegisterOutputParams sub.......................
Protected Overrides Sub RegisterOutputParams(ByVal pManager As GH_OutputParamManager)
Dim ghMyClassParameter As Grasshopper.Kernel.GH_Param(Of MyLibrary.MyClass)
pManager.RegisterParam(ghMyClassParameter, "MyClasses", "MC_P", "MyClass Output Parameters")
End Sub
It fails after execution of the regsiterparam method, i note that ghMyClassParameter has a value of null and have unsuccessfully tried casting from a new instance, say:
Dim myClass As New MyLibrary.MyClass
myClass.CastTo(ghMyClassParameter)
I still get a null instance for ghMyClassParameter
Cheers
Tags:
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