Handling unplugged state of the input parameter

Hello all,
I have an issue correctly addressing the unplugged socket data state. When I unplug the input parameter from my GH Plugin component I want to execute some part of the code, but fail, getting warnings( RuntimeErrorMessage)
Can anyone, please, help how to handle the issue? ( Please, see a pic attached).

There is a optional property for a given parameter. If set, the parameter doesn‘t require a connection.

Hello @TomTom , thank you for your advice,
Making inputs Optional partially solved my problem, but I’m still struggling…
Please, check the picture if you don’t mind :pray:

I don’t know, but an unset point is not equal to empty input. I guess you need to check if there is data. If you support two different versions, why don’t you simply provide two different components? I would only design components to delegate in- and output to my library code. So that my components act as a simple interface without doing anything smart. Keep it simple!

Hello @TomTom ,
It’s very simple actually, you got it right, what I want is to check if there is data( check if a slot is unplugged, Point3d). As for your suggestion about two components, I think, It will be more annoying for the consumer to use the second component for only choosing a custom profile(railTop) and its origin point(anchorPt). It’s better to have all options in one place.
Anyway thank you for your support, If I solve it, I will let you know.

I think you can check it in the DA instance. Just a tip, unless you don’t know. You can attach the debugger from VS with the Rhino process and jump through the code. You can inspect what comes in, and simply find it out for yourself. You can also use DNSpy and even jump through GH code. I can’t really help further because I’m not actively developing a plugin at the moment and setting up a plugin up just for help would be too much work…

1 Like

Thank you @TomTom , I appreciate your support. :pray: :pray: :pray: