Quintiq file version 2.0 
 | 
#parent: #root 
 | 
StaticMethod GetDefaultOwner ( 
 | 
  MacroPlan macroplan, 
 | 
  RoutingStep routingstep 
 | 
) remote as Unit 
 | 
{ 
 | 
  Description: 'Get default owner for new created lane in the Designer' 
 | 
  TextBody: 
 | 
  [* 
 | 
    // Adhi Feb-25-2016 (created) 
 | 
     
 | 
    // Get default owner for the operation 
 | 
    owner := select( macroplan, Unit, u, 
 | 
                     not u.IsChildOfAggregatedCapacity() 
 | 
                     and not u.HasCapacityTypeTransportBase() 
 | 
                     and not u.IsInRoutingStep( routingstep ) ); 
 | 
     
 | 
    if( isnull( owner ) ) 
 | 
    { 
 | 
      owner := select( macroplan, Unit, u, 
 | 
                       not u.IsChildOfAggregatedCapacity() 
 | 
                       and not u.HasCapacityTypeTransportBase() ); 
 | 
    } 
 | 
     
 | 
    return owner; 
 | 
  *] 
 | 
} 
 |