Subgraph functions let user acquire details on input and output ports of subgraph. These functions are only available in subgraphs. If you use them out of a subgraph, the functions fail. If you work with subgraphs, you may need parse mapping. See .
The function getSubgraphInputPortsCount()
returns the number of input ports.
Example 339. Usage of getSubgraphInputPortsCount
There is a subgraph having two input ports and one output port. The function getSubgraphInputPortsCount()
returns 2
.
See also: , ,
The function getSubgraphOutputPortsCount()
returns the number of output ports.
Example 340. Usage of getSubgraphOutputPortsCount
There is a subgraph having two input ports and one output port. The function getSubgraphOutputPortsCount()
returns 1
.
See also: , ,
The function isSubgraphInputPortConnected()
returns true
if the particular subgraph input port is connected. Otherwise, it returns false
.
Port numbers start from zero.
If portNo
is not a valid port number of a particular subgraph (negative value or too big value), the function fails with an error.
Example 341. Usage of isSubgraphInputPortConnected
There is a subgraph having two input ports: the first one is connected, the second one is not connected.
The function isSubgraphInputPortConnected(0)
returns true
.
The function isSubgraphInputPortConnected(1)
returns false
.
The function isSubgraphInputPortConnected(2)
fails.
See also: , ,
The function isSubgraphOutputPortConnected()
returns true
if the particular subgraph output port is connected. Otherwise, it returns false
.
Port numbers start from zero.
If portNo
is not a valid port number of a particular subgraph (negative value or too big value), the function fails with an error.
Example 342. Usage of isSubgraphOutputPortConnected
There is a subgraph having two output ports: the first one is connected, the second one is not connected.
The function isSubgraphOutputPortConnected(0)
returns true
.
The function isSubgraphOutputPortConnected(1)
returns false
.
The function isSubgraphOutputPortConnected(2)
fails.
See also: , ,