Nevron Open Vision Documentation
Routable Connectors

 
About Routable Connectors

Routable connectors are represented by the NRoutableConnector class, that derives from NShape. Routable connectors are special shapes, because NOV diagram may perform the following actions with them:

 

Routable Connector Model

The routable connector is interesting in the fact that its geometry is defined by a set of points, also known as the routable connector model. The routable connector model is accessible from the Model property. Currently there are two types of routable connector models:

  1. NOrthogonalRoutableConnectorModel - this is the default connector model. When the routable connector is using this model, it can be rerouted in an orthogonal fashion. The orthogonal connector model keeps track of the orientation of individual line segments in order to allow for HV editing of its segments and points.
  2. NPolylineRoutableConnectorModel - this is a more simple connector model that only contains a set of points through which the connector goes through.

The geometry of routable connectors is automatically updated to reflect the current model state. When the routable connector Model property is set to null (i.e. the connector does not have a model), the geometry is updated as a straight line. Several methods help you work with the connector model more easily:

  • The IsLine, IsPolyline and IsOrthogonal properties help you determine what type of model is the connector currently using.
  • The MakeLine, MakePolyline and MakeOrthogonal methods help you change the connector model.  
Rerouting

Routable connectors with orthogonal connector model can be rerouted to avoid obstacles in their path. This operation is performed by calling the Reroute() method of the connector. It tries to pool the connector for routing on the next document evaluation pass. You can also call the CanReroute() method to determine whether the routing is currently possible.

In most the cases you want the connector to be automatically rerouted. This is controlled by the RerouteMode property which accepts one of the following values:

Routing Manager

The routing of a connector is always performed by the NRoutingManager instance that is accessible from the RoutingManager property of each NPage. The routing manager considers as "obstacles" all 2D shapes. You can instruct the router to allow routes to go through certain 2D shapes either horizontally and/or vertically by setting the RouteThroughHorizontally and/or RouteThroughVertically properties of these shapes.

To globally disable routing you simply need to set the NRoutingManager-Enabled property to false. By default page routing is enabled. The routing manager will automatically stop to perform routing requests, if the page has more obstacles than the value specified by the NRoutingManager-MaxAvoidedObstacles property.

 

Send Feedback