chenqinghong
2024-05-07 3ec06a830367465068963156dcc1d8e522571c13
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
27
Quintiq file version 2.0
#parent: CustomDrawComponentRoutingConfigurator/CustomDrawDataLayerRoutingConfiguratorBackground
Response OnDrop (
  structured[Unit] source,
  Routing routing
) id:Response_CustomDrawComponentRoutingConfigurator_CustomDrawDataLayerRoutingConfiguratorBackground_OnDrop
{
  #keys: '[124808.0.1265706520]'
  Body:
  [*
    // Drop units to create routing step and add units to it
    operations := routing.CreateRoutingStepAndAddUnits( source );
    
    //Auto scroll to the newly created op
    op := maxselect( operations, Elements, op, true, op.Y() );
    if( not isnull( op ) )
    {
      CustomDrawComponentRoutingConfigurator.EnsureVisible( op.X(), op.Y() );
    }
  *]
  CanBindMultiple: false
  DefinitionID => /CustomDrawComponentRoutingConfigurator/Responsedef_CustomDrawComponentRoutingConfigurator_CustomDrawDataLayerRoutingConfiguratorBackground_OnDrop
  Precondition:
  [*
    return Operation::CanCreate( feedback, source, MacroPlan );
  *]
}