Solved Sample Code for Connecting Ports/Nodes?

Hi,

Is there a sample code for connecting ports/nodes?
Checked the sample code in github. Correct me if I'm wrong but no examples for it.

c478f191-0991-4d0c-bfb8-c8c97b9ba011-image.png

Hi,

There is no example that show specifically how to connect two ports because there is a function to do it. The function Connect must be used to connect two ports.

You can still have a look at this example where we mute a connection. To do so, we retrieve the wire, we change its attribut and reconnect the ports using this modified wire.

We will add another example where this function is used.

Cheers,
Manuel

MAXON SDK Specialist

MAXON Registered Developer

Hi,

There is no example that show specifically how to connect two ports because there is a function to do it. The function Connect must be used to connect two ports.

You can still have a look at this example where we mute a connection. To do so, we retrieve the wire, we change its attribut and reconnect the ports using this modified wire.

We will add another example where this function is used.

Cheers,
Manuel

MAXON SDK Specialist

MAXON Registered Developer

@Manuel

Gotcha. Thanks for the response.
Still having a hard time accessing the ports. Anyway for this quetion, I guess the Connect method does the job.

Also, why would a mute_selected_wire have more preference for connect_wires_between_nodes in terms of example?
It's like majority of the time spent in the node graph is creating, deleting and connecteding nodes.

hi,

There are no particular reasons. Muting a connection is less intuitive than connect two nodes. If there was a function like Connect to mute the connexion, we would not have created that example neither.

Cheers,
Manuel

MAXON SDK Specialist

MAXON Registered Developer