Cancel
Showing results for 
Search instead for 
Did you mean: 

Connect with interface

Solution Partner Experimenter Solution Partner Experimenter
Solution Partner Experimenter

Hello all

 

I have a problem connecting an object to a frame through code, because the frame has two inputs, and I have to specify which interface to connect to. For this I use the function "connect ()", to which I enter the source object and the target interface as attributes. I do it this way:

 

".MaterialFlow.Connector.connect (SingleProc,.Models.MainFrame.Frame2.Interface1);"

 

Where "SingleProc" is the source object, "MainFrame" is the frame where "SingleProc" is located and the frame where I have the two interfaces (Frame2). When I execute the code, it tells me to specify an interface inside the frame, when I am already indicating it.

 

What am I doing wrong?

 

Alternatively, is there a function for modifying the predecessor number?

 

Thank you very much

 

2 REPLIES

Betreff: Connect with interface

Siemens Phenom Siemens Phenom
Siemens Phenom

Hello E_conde,

The code you've posted should work fine.

I've created a small test and it works in this scenario.

Regards,

Ralf
------------------------------------------------------------------------------------------------------
Did you like the answer? Then click the Thumbs Up button.
Did the answer solve your problem? Then accept the answer as solution.

Betreff: Connect with interface

Solution Partner Experimenter Solution Partner Experimenter
Solution Partner Experimenter

Ralf,

 

Thank you very much for the example.


I think the problem is because the object to be connected is created with libraries and the type of connector I use is useless.

 

Thanks anyway for the clarification.

 

regards