HasConnectedInput 2.0 sdk

what is the new way to check if a port has a connection. the HasConnectedInput method does not look to be in there anymore

I’m going to give this a stab in the dark by using the API docs (I haven’t actually tried) , but if you get the port model from the node by using the InPorts property…


You can then get connector model from the port you’re interested in by using the connector property…


If this is null, then I guess it’s not connected.

This is just a guess though and might be a better way. I’ll try a little later on as I haven’t done this yet.

1 Like

@Daniel_Woodcock1 thanks I definitely saw that and can use a few different methods to rebuild a function that does the same thing as hasconnextedinput but just wondering why that went away.

I am wondering if there is a new approach to this in 2.0. there is still a ton of issue I have with the design of node model and how convoluted it is to interact with the inputs and outputs.

No worries @Robert_Cervellione1, shame I couldn’t be more help, I’m pretty new to the API. Not sure why it went though, maybe to better separate the different models. Maybe the Dynamo Tests github pages might shed some light?