question

Martin K5 avatar image
0 Likes"
Martin K5 asked Ryan Clark commented

How to connect paths by code?

Hi,

I tried to connect paths by code but unsuccessfully. I have attached a picture of my model and I would like to connect them by code? Does anyone know?


Thank you.

Martin

Capture.PNG

FlexSim 21.1.4
codeconnectionspath
capture.png (266.7 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.

Ryan Clark avatar image Ryan Clark commented ·

Hi @Martin K5, was someone's answer or comment helpful? If so, please click the "Accept" button at the bottom of the answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always unaccept and comment back to reopen your question.

0 Likes 0 ·

1 Answer

Tomasz MG avatar image
0 Likes"
Tomasz MG answered Martin K5 commented
· 4
5 |100000

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

Martin K5 avatar image Martin K5 commented ·
Well, I tried this one, but it does not work properly. It always joins corners of the paths, but I do not know how to connect one path to the specific position of the another path. So that is why I do not know how to set this up.

Thank you.

Martin

0 Likes 0 ·
Martin K5 avatar image Martin K5 commented ·

Little update: I modified the code, so I am able to have the connecting path as shown on the picture. I used this line of code:

treenode path01 = applicationcommand("Path_joinTo", path1, path9, 10, 2);

, but what I want now is to make another path connecting the same paths but to be oriented to the right side of the main path.


1633067935828.png

I there any way that I would be able to do so?

Thank you.


Martin

0 Likes 0 ·
1633067935828.png (8.0 KiB)
Phil BoBo avatar image Phil BoBo ♦♦ Martin K5 commented ·

You'll get better support if you would post your model or an example model demonstrating what you are doing instead of just pictures.

Try changing the distAlongTo from "2" to the value along the path where you want it to connect to.

0 Likes 0 ·
Martin K5 avatar image Martin K5 Phil BoBo ♦♦ commented ·
Hi,

thank you a lot.


0 Likes 0 ·