I’ve been working on a custom Grasshopper component and encountered an issue related to the Grasshopper.CentralSettings.CanvasFullNames
setting.
My problem is that when I save a .gh
file with Display Full Names enabled and then reopen it, Grasshopper.CentralSettings.CanvasFullNames
returns false
. I suspect this happens because my default settings have Nicknames as the default display mode.
This is causing an issue in my component because my SetOutputData
logic depends on this setting:
dataAccess.SetData(GetParamsActualName(parameter), data);
public string GetParamsActualName(P parameter)
{
return Grasshopper.CentralSettings.CanvasFullNames ? Name : NickName;
}
This can not be changed, and I can not use the SetData() with index.
Since CanvasFullNames
resets to false
on reopening, the expected parameter names are incorrect, leading to errors.
My questions:
- Can I somehow access the data to check how the input parameter names are currently displayed on the component?
- Is
Grasshopper.CentralSettings.CanvasFullNames
stored within the .gh file, or does it always revert to the user’s default settings?
I appreciate any guidance you can provide!