limj
2023-10-24 93652435728de839582440eefd5122c281181d35
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Quintiq file version 2.0
#parent: CustomDrawComponent/CustomDrawDataLayerNode
Response OnDrop (
  structured[UnitNode] source,
  StockingPointNode droptarget
) id:Response_CustomDrawComponent_CustomDrawDataLayerNode_OnDrop_870
{
  #keys: '[110994.0.669320412]'
  Body:
  [*
    // Link unit nodes to stocking point node
    feedback := '';
    sources := selectset( source, Elements.Unit, u, true, true );
    
    if ( droptarget.StockingPoint_MP().CanLinkToUnits( feedback, sources, false ) )
    {
      droptarget.StockingPoint_MP().LinkToUnits( sources, false );
    }
    else
    {
      droptarget.StockingPoint_MP().RemoveAsOutputFromUnits( sources );
    }
  *]
  DefinitionID: 'Responsedef_CustomDrawDataLayer_OnDrop'
  UserRequiresReadWrite: true
}