| Quintiq file version 2.0 | 
| #parent: CustomDrawComponent | 
| Response OnClick () id:Response_CustomDrawComponent_MenuSCDNewUnit_OnClick | 
| { | 
|   #keys: '[110880.3.972640080]' | 
|   Body: | 
|   [* | 
|     // Create a new Unit | 
|     ApplicationLibMacroPlanner.SupplyChainDiagramLastClickedLocation( this.ContextMenuClickAction().X(), this.ContextMenuClickAction().Y() ); | 
|     dlg := construct( DialogCreateEditUnit ); | 
|      | 
|     dlg.NewUnit( this, DataHolderFocusedUnit.Data(), ValueHolderX.UserData(), ValueHolderY.UserData() ); | 
|      | 
|     // Toggle on value holder to indicate changes | 
|     ApplicationLibMacroPlanner.SetSupplyChainOverviewWarning(); | 
|   *] | 
|   CanBindMultiple: false | 
|   DefinitionID => /CustomDrawComponent/Responsedef_CustomDrawComponent_Menu_OnClick | 
|   InheritSecurity: false | 
|   Initiator: 'MenuSCDNewUnit' | 
|   Precondition: | 
|   [* | 
|     return SupplyChainView::CanCreateUnit( MacroPlan, DataHolderFocusedSP.Data(), feedback ); | 
|   *] | 
|   UserRequiresReadWrite: true | 
| } |