Customizing Routing Mode Options (Schematic_CustomizeRoutingModes)

An opening ID is an entry point used to customize business logic. The Rule to customize routing mode options opening ID is available in the Diagram Resources resource set and is used to customize the routing mode options for different routable objects.

Note: For more information about customization by business rules, see Customization by Business Rules.

This page discusses:

General Information

This opening ID is invoked when you route the following elements in a diagram view:

  • Routable objects such as logical pipe, logical duct, or logical cable
  • Connections

This opening ID is used to customize the available routing modes (angle, straight, single step orthogonal) according to the routable object.

Definition Description
PLM Opening ID Schematic_CustomizeRoutingModes
Customization intent Computation
Execution context Client

Input Objects

Input objects must be of the following types:

  • ThisObject: LogicalOccurrence (Context occurrence in which the route or the connection is created)
  • Parameters corresponds to the context object.

Context Object Parameters

Parameter Name Type Read or Write Comments
Routable_Ref ObjectType Read

Reference of the routable object

Enter NULL for a connection

StraightMode Boolean Write TRUE to make straight mode available
AngledMode Boolean Write TRUE to make angled mode available
OrthoMode Boolean Write TRUE to make orthogonal mode available
Allow45Angle Boolean Write

TRUE to make the 45-degree angle available in angled mode

Note: - 45 degrees automatically makes 90 degrees available.

FALSE to make only the 90-degree angle available in angled mode

Notes:
  • If the opening ID is not available or if the execution fails, all the routing modes are available.
  • The previously used routing mode is the default selection if not restricted by opening ID.

Sample

The following example shows you how to define routing modes for given routing elements.

Routable Object Type Restricted Routing Mode List of Available Routing Modes
Logical Pipe Straight line and orthogonal Angled (only 90 degrees)
Logical Connection Straight line Orthogonal and angled (45 degrees)

Notify("Rule triggered")

Let RoutableReference(RFLVPMLogicalReference)
Set RoutableReference = Parameters.GetAttributeObject ("Routable_Ref")

Let StraightModeAvailable(Boolean)
Set StraightModeAvailable = TRUE
Let AngledModeAvailable(Boolean)
Set AngledModeAvailable = TRUE
Let OrthoModeAvailable(Boolean)
Set OrthoModeAvailable = TRUE
Let IsFortyFiveAngleAllowed (Boolean)
Set IsFortyFiveAngleAllowed = TRUE

if (NULL <> RoutableReference)
{
	Notify("RoutableObject")
	
	Let RoutableObjectType(String)
	Set RoutableObjectType = RoutableReference.V_discipline
	

	If ( "Piping_Logical_Pipe" == RoutableObjectType)
	{
		Notify("Logical Pipe")
		Set StraightModeAvailable = FALSE
Set OrthoModeAvailable = FALSE
Set IsFortyFiveAngleAllowed = FALSE
	}
	
}
else
{
	Notify("Logical Connection")
	Set StraightModeAvailable = FALSE	
}
Parameters.SetAttributeBoolean("StraightMode", StraightModeAvailable)
Parameters.SetAttributeBoolean("AngledMode", AngledModeAvailable)
Parameters.SetAttributeBoolean("OrthoMode", OrthoModeAvailable)
Parameters.SetAttributeBoolean("Allow45Angle", IsFortyFiveAngleAllowed)