Update "Routing Rule" behaviour with Python

Hey guys!

I’m creating a small modular street component system.
Each street can be connected with up to 3 following street components (curve to left, straight, curve to right).

It works pretty good so far but I have to set up every single street component’s routing by hand.
Therefore my question: Is it possible to update the rules of a RoutingRule behaviour with Python?
I could not find any solution in the help files unfortunately.
Or is there any other solution to easily change the routing rules for multiple components?

Thanks in advance!

  • Johnny

I think there is no Python API for defining routing rules. However, you can override all routing and use your own Python logic to decide where each arriving component should go.

See OnRoute event of vcRoutingRule in the Python API reference.

1 Like

Thanks TSy!
I think I can do something with that.