algorithmic modeling for Rhino
Tags:
If you clear the values on the input, no data will be passed to the c# script component. But in the internal script there are some objecttypes, that have their own default values.
It depends on the type of input. Only object type provides a null, if no value is ommitted. So even if you empty (clear values) an input of let's say a Point3d type...you have to test against Point3d.Unset.
if(P == Point3d.Unset)
return;
strings type has "" as default. But if you want to get sure you should test like this:
if(string.IsNullOrWhiteSpace(mystring) || string.IsNullOrEmpty(mystring))
return;
Cheers
FF
thank you Florian but my problem is that when I select a curve and I would do another test with another curve my component takes into account both the first and second curves :(
Hi Florian,
this problem is due to the creation of layer to set the output .
but I don't know how I solve ://
Hi sawsan,
It's a bit complicated now to get the idea, what's going on in your component. Can you send an example or better do some tests with c# script component. So we can work it out.
Best regards
FF
hi Florian,
you will find attached an example:
"component lay" takes the component outputs explode and put them
in layer .
the problem is that when I select a curve and I would do another test with another curve my component takes into account both the first and second curves :/
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