I’m trying my hand at a custom C# component to list all of the output parameters in my grasshopper document.
I’ve completed Long Nguyen’s excellent online workshop but I’m stumbling at accessing the ‘.Params’ correctly in my code.
objectOutputNickNames = new List<string>();
foreach (var ghObject in thisGHDocument.Objects)
{
if (ghObject != null)
{
foreach(IGH_Param outputParameter in ghObject.Params.Output)
{
objectOutputNickNames.Add(outputParameter.NickName);
}
}
}
I’m getting the error “‘IGH_DocumnentObject’ does not contain a definition for ‘Params’”
I’ve been able to successfully query the grasshopper document for a list of object nicknames, but I’m stumped on getting a list of output parameter nicknames.
I’m sure there is a simple solution to this, but all of my searching for example code uses ‘Params’ which I don’t know how to access.
Any suggestions would be greatly appreciated.
Leo