algorithmic modeling for Rhino
I have made a custom object that includes geometric (BRep) and numerical data:
public Brep a { get; set; }
public List<Brep> b { get; set; }
public String c { get; set; }
public double d { get; set; }
public double e { get; set; }
public double f { get; set; }
The problem is that this parameter cannot be internalised. When I right-click it, it doesn't have the option to internalise the data.
Any idea how I could add this feature to this parameter?
Tags:
You need to inherit from GH_PersistentParam instead of GH_Param. But you also have to make sure your custom Goo is fully (de)serializable.
--
David Rutten
david@mcneel.com
Thanks David for your fast reply!
I changed the inheritance to:
public class Custom_Param : GH_PersistentParam<Custom_Data>
and this gave this error:
'Custom.GH_Parameters.Custom_Param' does not implement inherited abstract member 'Grasshopper.Kernel.GH_PersistentParamstrong>Custom.GH_Parameters.Custom_Data>.Prompt_Singular(ref Custom.GH_Parameters.Custom_Data)'
Well, you'll need to implement all the abstract method of the base class. If your data does not allow for selecting or user-specification then just return false in those methods.
--
David Rutten
david@mcneel.com
Welcome to
Grasshopper
© 2025 Created by Scott Davidson.
Powered by