| Quintiq file version 2.0 | 
| #parent: #root | 
| FunctionOverride CalcPISPNodeY | 
| { | 
|   TextBody: | 
|   [* | 
|     rcv := this.RoutingConfiguratorView(); | 
|      | 
|     previousnode := this.Previous(); | 
|     prevstep := guard( this.RoutingStep().PreviousStep(), null( RoutingStep ) ); | 
|      | 
|     value := guard( previousnode.PISPNodeY(), rcv.OffsetY() + RoutingConfiguratorView::GetConstOffset() ); | 
|      | 
|      | 
|     if( not isnull( previousnode ) ) | 
|     { | 
|       value:= previousnode.PISPNodeY() + rcv.PISPHeight();  | 
|        | 
|       if ( this.InputGroupCode() <> previousnode.InputGroupCode() ) | 
|       { | 
|           if( this.InputGroupCode() <> '' ) | 
|           { | 
|             value := value + rcv.OperationInputGroupThickness(); | 
|           } | 
|           if( previousnode.InputGroupCode() <> '' ) | 
|           { | 
|             value := value + rcv.OperationInputGroupThickness(); | 
|           } | 
|       } | 
|     } | 
|     else if ( not isnull( prevstep ) )  | 
|     { | 
|      // routingstep y based on the maxvalue for previous step height, previous input and ouputput height | 
|       previousstepbot := prevstep.Y() + prevstep.Height(); | 
|       previousinputbot := guard( prevstep.LastOperationInputPISPNode().PISPNodeY() + rcv.PISPHeight(), 0 ); | 
|       previousoutputbot := guard( prevstep.LastOperationOutputPISPNode().PISPNodeY() + rcv.PISPHeight(), 0 ); | 
|        | 
|       value := maxvalue( value, previousstepbot, previousinputbot, previousoutputbot ) + rcv.RoutingStepDistance(); | 
|     }   | 
|      | 
|     this.PISPNodeY( value ); | 
|   *] | 
| } |