haorenhui
2023-10-30 6d6cc10d9e8e242661da7fd655dec155a09d676c
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
Quintiq file version 2.0
#parent: #root
Method InitializeRoutingsAfterImport
{
  Description: 'Performs necessary initializations on operation after import'
  TextBody:
  [*
    // desmondt Jul-24-2015 (created)
    
    // Set sequence numberk
    if( this.GlobalParameters_MP().UseDefaultDisplayIndex() )
    {
      this.SetDefaultDisplayIndexForRoutingSteps();
    }
    
    // Sort routing step by sequence number from excel
    traverse( this, Routing, r )
    {
      r.SortStep( attribute( RoutingStep, SequenceNumberForExcel ), true );
      // Upon importing routings, we go to their operations and set the input group to none zero
      // thus allowing them to be grouped together even if the imported data has input group being 
      // 0 (NotInputGroup)  
      r.SynchronizeOperationInputsGroupID();
    }
  *]
}