I came across this animation on the old Grasshopper forums, where it appears that the CanInsertParameter and CanRemoveParameter methods of the left component are being dynamically overridden by a C# script.
How would I go about achieving something similar? Can the methods of any component be overriden?
And what does the ‘overrides’ section in the C# scripting window actually affect? Using Reflection shows that this is of type Grasshopper.Kernel.GH_ScriptInstance, with attributes
AfterRunScript, BeforeRunScript, ClippingBox, DrawViewportMeshes, DrawViewportWires etc. and inheriting directly from
I can’t find any reference to it in the official SDK, or how to access the enclosing Component_CSNET_Script object in the manner of
ghenv.Component in Python.
Any pointers in the right direction would be much appreciated!