| Quintiq file version 2.0 | 
| #parent: #root | 
| Method ExportCampaigns | 
| { | 
|   Description: 'Method to export campaigns to message via QI' | 
|   TextBody: | 
|   [* | 
|     // Initiate some variables including base NVT | 
|     exportfilename := 'Campaigns.xml'; | 
|     routename := 'QuintiqExportCampaignsFileRoute'; | 
|     basenvt := NamedValueTree::Create(); | 
|     basenvt.Root( GlobalParameters_MP::GetDatasetMPSync() ); | 
|     mp := this.MacroPlan(); | 
|      | 
|     campaigns := selectset( mp, Unit.Campaign_MP, cam, true ); | 
|     this.ExportObjectToNVT( basenvt, campaigns, typeof( IOCampaign_MP ) ); | 
|      | 
|     camptypes := selectset( mp, Unit.CampaignType_MP, ct, true ); | 
|     this.ExportObjectToNVT( basenvt, camptypes, typeof( IOCampaignType_MP ) ); | 
|      | 
|     opincamptypes := selectset( mp, Unit.Operation.OperationInCampaignType, oct, true ); | 
|     this.ExportObjectToNVT( basenvt, opincamptypes, typeof( IOOperationInCampaignType ) ); | 
|      | 
|     opintrantypes := selectset( mp, Unit.Operation.OperationInTransitionType, ott, true ); | 
|     this.ExportObjectToNVT( basenvt, opintrantypes, typeof( IOOperationInTransitionType ) ); | 
|      | 
|     trantypes := selectset( mp, Unit.TransitionType_MP, tt, true ); | 
|     this.ExportObjectToNVT( basenvt, trantypes, typeof( IOTransitionType_MP ) ); | 
|      | 
|     this.ExportNVTToQI( exportfilename, routename, basenvt ); | 
|   *] | 
| } |