Quintiq file version 2.0 
 | 
#parent: #root 
 | 
Method ExportRoutings 
 | 
{ 
 | 
  Description: 'Method to export routings to message via QI' 
 | 
  TextBody: 
 | 
  [* 
 | 
    // Initiate some variables including base NVT 
 | 
    exportfilename := 'Routings.xml'; 
 | 
    routename := 'QuintiqExportRoutingsFileRoute'; 
 | 
    basenvt := NamedValueTree::Create(); 
 | 
    basenvt.Root( GlobalParameters_MP::GetDatasetMPSync() ); 
 | 
    mp := this.MacroPlan(); 
 | 
     
 | 
    operations := selectset( mp, Unit.Operation, op, true ); 
 | 
    this.ExportObjectToNVT( basenvt, operations, typeof( IOOperation ) ); 
 | 
     
 | 
    opboms := selectset( operations, Elements.OperationBOM, ob, true ); 
 | 
    this.ExportObjectToNVT( basenvt, opboms, typeof( IOOperationBOM ) ); 
 | 
     
 | 
    opinputgrps := selectset( operations, Elements.OperationInputGroup, oig, true ); 
 | 
    this.ExportObjectToNVT( basenvt, opinputgrps, typeof( IOOperationInputGroup ) ); 
 | 
     
 | 
    opinputsets := selectset( operations, Elements.OperationInputSet, ois, true ); 
 | 
    this.ExportObjectToNVT( basenvt, opinputsets, typeof( IOOperationInputSet ) ); 
 | 
     
 | 
    oplinks := selectset( operations, Elements.SourceOperationLink, oil, true ); 
 | 
    this.ExportObjectToNVT( basenvt, oplinks, typeof( IOOperationLink ) ); 
 | 
     
 | 
    routings := selectset( mp, Routing, rt, true ); 
 | 
    this.ExportObjectToNVT( basenvt, routings, typeof( IORouting ) ); 
 | 
     
 | 
    rtconfigviews := selectset( mp, ViewBase.astype( RoutingConfiguratorView ), rv, true ); 
 | 
    this.ExportObjectToNVT( basenvt, rtconfigviews, typeof( IORoutingConfiguratorView ) ); 
 | 
     
 | 
    rtsteps := selectset( routings, Elements.RoutingStep, rs, true ); 
 | 
    this.ExportObjectToNVT( basenvt, rtsteps, typeof( IORoutingStep ) ); 
 | 
     
 | 
    this.ExportNVTToQI( exportfilename, routename, basenvt ); 
 | 
  *] 
 | 
} 
 |