| Quintiq file version 2.0 | 
| #parent: CustomDrawComponent | 
| Response OnClick () id:Response_CustomDrawComponent_MenuImport_OnClick | 
| { | 
|   #keys: '[132448.0.516478609]' | 
|   Body: | 
|   [* | 
|     //Import view from xml | 
|     filename := Application.GetOpenFileName(); | 
|      | 
|     if( filename <> '' ) | 
|     { | 
|       feedback := ''; | 
|       xml := Application.ReadTextFile( filename ); | 
|       supplyChainViews := construct( SupplyChainViews );   | 
|       supplyChainViews.Add( DataHolderView.Data() ); | 
|        | 
|       if( not SupplyChainView::ImportFromXML( supplyChainViews, xml, feedback ) ) | 
|       { | 
|         MessageBox::Warning( this, feedback, '&Ok' ); | 
|       } | 
|     } | 
|   *] | 
|   CanBindMultiple: false | 
|   DefinitionID => /CustomDrawComponent/Responsedef_CustomDrawComponent_Menu_OnClick | 
|   Initiator: 'MenuImport' | 
|   Precondition: | 
|   [* | 
|     return MacroPlan::HasMacroPlan( MacroPlan, feedback ) | 
|            and not isnull( DataHolderView.Data() ); | 
|   *] | 
| } |