Q1: I’m trying to figure out how a paramater in the signature of GH Script Components (VB,NET & C#.NET) is defined as a reference (ref
) or by value, but it seems I cannot from the massive info below figure out which of the properties holds this info.
Q2: I would also like to know how to determine (again, from the info below) how a paramater is defoined as an out
parameter.
foreach (int i=0; i< comp.Params.Input.Count; i++)
{
IGH_Param param = comp.Params.Input[i];
param.HuhProperty? // which one defines ref, 'by value' or 'out' ?
}
Q3: I also failed to find where the visibility for the signature is defined (perhaps not really need in a ScriptComponent since the signature is fixed, but it would be nice to know anyway). How/where?
The following Watch properties were copied during a debug session:
comp. {ScriptComponents.Component_VBNET_Script} Grasshopper.Kernel.IGH_DocumentObject {ScriptComponents.Component_VBNET_Script}
Attributes {ScriptComponents.GenericScriptAttributes} Grasshopper.Kernel.IGH_Attributes {ScriptComponents.GenericScriptAttributes}
AvailableTypeHints Count = 29 System.Collections.Generic.List<Grasshopper.Kernel.Parameters.IGH_TypeHint>
Category "Maths" string
ClippingBox {1,0,0 - -1,0,0} Rhino.Geometry.BoundingBox
ComponentGuid {079bd9bd-54a0-41d4-98af-db999015f63d} System.Guid
DataComparison LongestList Grasshopper.Kernel.GH_DataComparison
Description "A VB.NET scriptable component" string
Exposure secondary Grasshopper.Kernel.GH_Exposure
HasCategory true bool
HasSubCategory true bool
HelpDescription "A VB.NET scriptable component" string
Hidden false bool
Icon {System.Drawing.Bitmap} System.Drawing.Bitmap
IconCapableUI true bool
IconDisplayMode application Grasshopper.Kernel.GH_IconDisplayMode
Icon_24x24 {System.Drawing.Bitmap} System.Drawing.Bitmap
Icon_24x24_Locked {System.Drawing.Bitmap} System.Drawing.Bitmap
InConstructor false bool
InstanceDescription "This component ran once.\r\n" string
InstanceGuid {225cbc84-4af4-4cd4-9f24-4e25ab9c5e63} System.Guid
Internal_Icon_24x24 null System.Drawing.Bitmap
IsBakeCapable false bool
IsDataProvider false bool
IsPreviewCapable true bool
IsValidPrincipalParameterIndex false bool
Keywords null System.Collections.Generic.IEnumerable<string>
Language VB Grasshopper.GUI.Script.GH_ScriptLanguage
Locked false bool
Message null string
MutableNickName true bool
Name "VB Script" string
NickName "VB" string
Obsolete false bool
Params {Grasshopper.Kernel.GH_ComponentParamServer} Grasshopper.Kernel.GH_ComponentParamServer
* Input Count = 2 System.Collections.Generic.List<Grasshopper.Kernel.IGH_Param>
* [0] {Grasshopper.Kernel.Parameters.Param_ScriptVariable} Grasshopper.Kernel.IGH_Param {Grasshopper.Kernel.Parameters.Param_ScriptVariable}
Access item Grasshopper.Kernel.GH_ParamAccess
AllowTreeAccess true bool
AngleParameter false bool
Attributes {Grasshopper.Kernel.Attributes.GH_LinkedParamAttributes} Grasshopper.Kernel.IGH_Attributes {Grasshopper.Kernel.Attributes.GH_LinkedParamAttributes}
Category "Maths" string
ClippingBox {1,0,0 - -1,0,0} Rhino.Geometry.BoundingBox
ComponentGuid {84fa917c-1ed8-4db3-8be1-7bdc4a6495a2} System.Guid
DataMapping None Grasshopper.Kernel.GH_DataMapping
DataType void Grasshopper.Kernel.GH_ParamData
Description "Script Variable x" string
Exposure -1 Grasshopper.Kernel.GH_Exposure
HasCategory true bool
HasProxySources false bool
HasSubCategory true bool
Hidden false bool
Hints Count = 29 System.Collections.Generic.List<Grasshopper.Kernel.Parameters.IGH_TypeHint>
Icon {System.Drawing.Bitmap} System.Drawing.Bitmap
IconCapableUI true bool
IconDisplayMode application Grasshopper.Kernel.GH_IconDisplayMode
Icon_24x24 {System.Drawing.Bitmap} System.Drawing.Bitmap
Icon_24x24_Locked {System.Drawing.Bitmap} System.Drawing.Bitmap
InstanceDescription "{Type hint: Point3d}\r\nEmpty Generic Data parameter" string
InstanceGuid {9cddcad6-66f3-4da5-bd56-95c5d44c58db} System.Guid
Internal_Icon_24x24 null System.Drawing.Bitmap
IsBakeCapable false bool
IsDataProvider false bool
IsPreviewCapable true bool
IsPrincipal IsNotPrincipal Grasshopper.Kernel.GH_PrincipalState
Keywords null System.Collections.Generic.IEnumerable<string>
Kind input Grasshopper.Kernel.GH_ParamKind
Locked false bool
MutableNickName true bool
Name "x" string
* NickName "XX" string
Obsolete false bool
Optional true bool
PersistentData {empty structure} Grasshopper.Kernel.Data.GH_Structure<Grasshopper.Kernel.Types.IGH_Goo>
PersistentDataCount 0 int
Phase Collected Grasshopper.Kernel.GH_SolutionPhase
ProcessorTime {00:00:00.0000012} System.TimeSpan
ProxySourceCount 0 int
Recipients Count = 0 System.Collections.Generic.IList<Grasshopper.Kernel.IGH_Param> {System.Collections.Generic.List<Grasshopper.Kernel.IGH_Param>}
Reverse false bool
RuntimeMessageLevel Blank Grasshopper.Kernel.GH_RuntimeMessageLevel
ShowHints true bool
Simplify false bool
SourceCount 0 int
Sources Count = 0 System.Collections.Generic.IList<Grasshopper.Kernel.IGH_Param> {System.Collections.Generic.List<Grasshopper.Kernel.IGH_Param>}
StateTags Count = 0 Grasshopper.Kernel.GH_StateTagList
SubCategory "Script" string
* Type {Name = "IGH_Goo" FullName = "Grasshopper.Kernel.Types.IGH_Goo"} System.Type {System.RuntimeType}
* TypeHint {Grasshopper.Kernel.Parameters.Hints.GH_Point3dHint} Grasshopper.Kernel.Parameters.IGH_TypeHint {Grasshopper.Kernel.Parameters.Hints.GH_Point3dHint}
HintID {e1937b56-b1da-4c12-8bd8-e34ee81746ef} System.Guid
* TypeName "Point3d" string
TypeName "Generic Data" string
UseDegrees false bool
VolatileData {empty structure} Grasshopper.Kernel.Data.IGH_Structure {Grasshopper.Kernel.Data.GH_Structure<Grasshopper.Kernel.Types.IGH_Goo>}
VolatileDataCount 0 int
WireDisplay default Grasshopper.Kernel.GH_ParamWireDisplay
// Rolf