algorithmic modeling for Rhino
Hello,
I am new to scripting in GH, but have some experience in scripting.
I am having trouble making a simple boolean conditional that outputs one of two inputs, based on a boolean value.
I am not getting errors on the "out" channel, but I am not getting any Curves out of the output channel, either.
Any help would be greatly appreciated.
private void RunScript(Curve Curve1, Curve FlipCurve, bool Bool, ref object CurveOut)
{
Curve CurveOut;
if (Bool){
CurveOut = FlipCurve; }
else {
CurveOut = Curve1; }
}
aaron
Tags:
Hi Aaron,
The output argument is passed by reference, so you should not declare a local variable CurveOut inside the RunScript method. Remove the first line (Curve CurveOut;) and it should work.
Cheers,
Sridevi
Sridevi,
That fixed it, Thanks!
aaron
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by