canConnectTo always returning true...

craouettecraouette Posts: 113
edited March 2016 in Integrations


I was trying to implement a popup menu with all the possible connection from one input of a node of a graph to all other inputs and outputs of all other nodes... but it appears that canConnectTo is always returning true...
I am calling exec.canConnectTo with the port name or the node name and the pin name, separated by a '.' and passing "." as the 3rd argument.
What am I doing wrong?




  • borjaborja Administrator, Fabric Employee Posts: 480 admin

    Hi @craouette

    nodename.port should be fine
    Check FABRIC_DIR\Tests\Core\Canvas\ for some examples of this call
    If this still fails for you, try to make a simple fail scenario so we could take a look at it.

    Borja Morales
    Technical Product Manager
    Fabric Software Inc.

  • pzionpzion Moderator, Fabric Employee Posts: 118 Fabric Employee

    Note that the return value of canConnectTo isn't a boolean but rather a string description (possibly in JSON format, I can't remember) of the new errors that would occur if you were to connect. If you are treating it as a Boolean this may be your problem!

    Peter Zion
    Fabric Engine

  • craouettecraouette Posts: 113

    oki, found my error, thanks. I was still on the old version which was returning a boolean....
    but, there is one problem, Boolean can be connected to PolygonMesh...
    For example, load the Rock_generator in canvas from the other discussion, and then the user can create a connection the Output of Boolean_1 to the PolygonMesh Input of Smooth_1, as shown in the picture bellow:

  • craouettecraouette Posts: 113

    sorry @pzion I saw your comment after adding mine... you were absolutely right!

Sign In or Register to comment.