yanyuan
2023-11-10 143ef74e2eeee697ac8fda3d9032a790fbb4e146
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
Quintiq file version 2.0
#parent: #root
FunctionOverride CalcToAndFrom
{
  TextBody:
  [*
    // Calculate initial and final point
    x0 := 0;
    x1 := 0;
    y0 := 0;
    y1 := 0;
    
    
    //PISP -> OperationInput
    rcv := this.OperationInputGroup().RoutingConfiguratorView();
    if( not isnull( rcv ) )
    {
      pispwidth := rcv.PISPWidth()
      
      midopheight := [Number] ( rcv.OperationInputOutputHeight() / 2 );
    
      fromop := this.OperationInput();
      toop := this.OperationInput();
    
      if( not isnull( toop ) and not isnull( fromop ) )
      {
        x0 := fromop.PISPNodeX() + pispwidth + rcv.OperationInputGroupThickness();
        y0 :=[Number]( this.OperationInputGroup().PISPY() + this.OperationInputGroup().PISPHeight()/ 2 );
        x1 := toop.X();
        y1 := toop.OperationInputGroup().Y() + midopheight;
      
      }
    }
    
    // Set
    this.FromX( x0 );
    this.FromY( y0 );
    this.ToX( x1 );
    this.ToY( y1 );
  *]
}