Sounds like you can perform those checks inside the component SolveInstance
or BeforeSolveInstance
methods just by looking at the input datatree.
private bool _validInputs;
protected override void BeforeSolveInstance()
{
_validInputs = true;
if (Params.Input[1].VolatileData.PathCount > 1)
{
AddRuntimeMessage(
GH_RuntimeMessageLevel.Error,
"The second input may not contain more than a single list of items.");
_validInputs = false;
}
}
protected override void SolveInstance(IGH_DataAccess access)
{
if (!_validInputs && access.Iteration > 0)
{
// Perhaps the Iteration check doesn't work for you,
// in which case the access.ParameterTargetIndex(int) or
// access.ParameterTargetPath(int) may.
access.DisableGapLogic();
return;
}
...
}