question

Omar Aguilera Rico avatar image
0 Likes"
Omar Aguilera Rico asked Omar Aguilera Rico commented

contextdragconnection () does not create connections

Hello! In the model that I append I create objects by means of a code and then I try to connect them by the contextdragconnection () command but the connections are not made. If I manually add two processors and connect them with that same command, if the connection is made. What do you think the problem is and what is the solution?

crea-objetos-de-acuerdo-a-las-filas-de-una-global.fsm

FlexSim 19.0.2
custom codecontextdragconnection
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

·
tannerp avatar image
1 Like"
tannerp answered Omar Aguilera Rico commented

I would recommend using "createinstance" instead of "createcopy." It makes an instance of the item independent of other parts of the model. This allows you to make the connections. I've updated your model by changing "createcopy" commands to "createinstance" commands and it should work now.

createinstance.fsm


createinstance.fsm (18.8 KiB)
· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Omar Aguilera Rico avatar image Omar Aguilera Rico commented ·

I try it and it works. Thanks @Tanner Poulton!

1 Like 1 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.