Hi all, I’m trying to expire multiple components on my canvas (from another component)
One way to go about it is the below code
var doc = Grasshopper.Instances.ActiveCanvas.Document;
foreach (Grasshopper_LinkajouTemplateWithFlags obj in doc.Objects.OfType<Grasshopper_LinkajouTemplateWithFlags>().Where(o => !ReferenceEquals(this, o)))
{
if(obj.Country != country)
{
obj.Country = country;
obj.ExpireSolution(false);
}
}
OnDisplayExpired(true);
However it looks to me like it’s more lightweight to set the objects to BLANK ?
if multiple of these components are connected, it might expire the most downstream first and then it will re-run when i expire the more upstream. Is there a way to mark them all to blank and then force rerunning all BLANK items. And in that case how would that code look like?
Best, Mathias