[SOLVED]connect process inputs to an operator programmatically

siamak_want
siamak_want New Altair Community Member
edited November 5 in Community Q&A
Hi guys,

I need to connect the input ports of my "Main process" to one of the inner operators in my process programmatically. I mean, I don't want to save the process as xml and I want to connect the input as follows:

ExtractClusterPrototypesOP.getOutputPorts().getPortByIndex(0).connectTo(generateIDOP.getInputPorts().getPortByIndex(0));
The above code works fine, because every "output port" has the method "connectTO()". But in my case, In fact, I need to connect 2 input ports together. i.e. the input port of my main process to the input port of one of my inner operators in the main process. So I don't have any "connectTo" method. Any idea?

Thanks

Answers