Grasshopper

algorithmic modeling for Rhino

Is there a way to replace a null with a number?

Thanks in advance,
Michael

Views: 1618

Replies to This Discussion

I just had the same thing to do. And (of course) it is a very easy thing to do (with vb.net). I'm sure you figured it out already but just for the record:

1. create a vb.net component
2. place the following code where it says your code here

If IsDBNull(x) Then
A = 0 'replace this with the value you need
Else
A = x
End If

3. you only need one input therefore you can delete the default y input in the input manager

Regards,
Tobias
Purely GH seems simple enough.
Attachments:
Sure, I didn't think of that. In that case the VB component will most probably be the easiest.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service