Custom Indicators For Visual Production Planning with Dynamics NAV

Posted by Ute Gillet on Jun 2, 2017 4:18:57 PM

As user of and/or partner reselling our VPS Gantt add-in for production planning with Dynamics NAV you most likely already know its visual alerts indicating impending collisions of planned orders with operational processes: The capacity curve, for instance, turns red in case of an impending overload and delivery date exceeding will be hatched.

There are cases, however, when more, individual visual signals are called for in order to highlight conflicts with individual business rules at operational level. So let me show you today how you can use the indicators available in the VPS to set certain visual signals individually.

Individual application of visual alerts

There are various sensitive areas in the operational processes of manufacturing companies the planner has to pay particular attention to. To some this will be keeping the delivery dates, for others emphasis is put on indicating whether enough material for the order is on stock or on indicating the order of an important customer that is not to move.

In addition to the visual alerts mentioned above, the VPS offers another feature with which to highlight cases following your own business rules by changing the main font color of the planning table. You can choose whether to modify the font color in the table area on Production Order Lines level and/or on operation level in the Gantt area. This is done by so-called indicators.

Indicators control the font color

The indicator functionality in the Visual Production Scheduler allows to modify the main font color (from 27 available colors) of the planning table responding to individual business logic. You can choose whether to modify the font color in the table area on Production Order Lines level and/or on operation level in the Gantt area. Several indicators can be used simultaneously, e.g., material shortfall could be indicated by red font color on Production Order Line level while at the same time on the operations level orders with highest priority are marked by blue font color.

The following screenshot shows two indicators “at work”.

  1. Indicator on production order line “1011002 – 10000” with font color red
  2. Indicator on operation “20” of production order line “1011002 – 10000” with font color blue

Indicators in Visual Production Scheduler for individual visual signals

Definition of an Indicator Object

To set an indicator, an indicator object has to be created and the according properties identifying the objects the indicator is to be applied to have to be filled. This indicator object has to be added to a list so that if you have defined more than one indicator they will be applied one after the other. The following table shows the settings needed for an indicator object.

Indicator

 

 

Property

Data type

Description

IndicatorObjectType

Enum/Option

Specifies which object is identified by the following properties:

0 = Undefined

1 = View

2 = Status

3 = ProductionOrder

4 = ProductionOrderLine

5 = ProductionOrderRoutingLine

6 = WorkCenter

7 = MachineCenter

POStatus

String

 

PONo

String

 

POLineNo

String

 

RoutingNo

String

 

RoutingRefNo

String

 

OPNo

String

 

WCNo

String

 

MCNo

String

 

IndicatorValue

String

RGB color value

IndicatorDisplayType

Enum/Option

How ist he indicator to be displayed:

0 = Undefined

1 = MainFontColor

ValidityType

Enum/Option

How long is the indicator valid:

0 = Undefined

1 = Permanent

2 = FirstChangeOfDataInSchedule

ViewType

Enum/Option

View the indicator belongs to:

0 = Undefined

1 = ProductionOrders

2 = Capacities

4 = Loads

Applying indicators automatically after the VPS has been started.

In order to apply your indicators automatically after having started the VPS, you have to modify the event OnDataLoaded. This could be done like shown below: 

HandleAddInMessage(Index : Integer;Data : BigText)
CASE Index OF 

  // EVENTID_OnDataLoaded
  2100:
  BEGIN
    ProcessDataLoaded();
  END;

In our sample implementation,, we have enhanced the event by the ProcessDataLoaded() function which calls the SetAllIndicatorsForSchedule() function to create indicators, equip them with values and handle them over to the VPS.

Sample code for creating an indicator

The following code snippet is taken from the SetAllIndicatorsForSchedule() code for creating an indicator for a „ProductionOrderRoutingLine“ (operation). In this code snippet, the necessary values for identifying the correct RoutingLine and color and validity are specified.

Indicator.IndicatorObjectType :=
    IndicatorObjectType.ProductionOrderRoutingLine;
Indicator.POStatus :=
    FORMAT(ProdOrderRoutingLine.Status,0,2);
Indicator.PONo :=
    FORMAT(ProdOrderRoutingLine."Prod. Order No.");
Indicator.POLineNo :=
    FORMAT(lProdOrderLine."Line No.");
Indicator.RoutingNo :=
    FORMAT(ProdOrderRoutingLine."Routing No.");
Indicator.RoutingRefNo :=
    FORMAT( ProdOrderRoutingLine."Routing Reference No.");
Indicator.OPNo :=
    FORMAT(ProdOrderRoutingLine."Operation No.");
Indicator.IndicatorDisplayType :=
    IndicatorDisplayType.MainFontColor;
Indicator.IndicatorValue :=
    FORMAT(lColor.Yellow.ToArgb());
Indicator.IndicatorValidityType :=
    IndicatorValidityType.FirstChangeOfDataInSchedule;

For the complete code of the sample implementation, see the SetAllIndicatorsForSchedule() function

Applying indicators for selected objects 

In addition to applying indicators automatically upon starting the VPS, the decision whether to use indicators or not and at which position can be left to the user by offering an additional item in the context menu. This way of using indicators bears the advantage of reducing complex calculations since the user only retrieves them for certain selected objects. 

Two steps are needed to use the indicators: 

  1. Implement the ProcessRequestIndicator
      // EVENTID_RequestIndicators
      2240:
      BEGIN
        CLEAR(myBigText);
        ProdSchedMan.ProcessRequestIndicator(Data, myBigText);
        SetAddInValueByBT('1140',myBigText);
      END;

  2.  Tick the “Use Indicators” check box in the NAV Table “NETRONIC VPS Setup” (5416000) 

Set visual signals in Visual Production Scheduler for NAV

After this is done and the Visual Production Scheduler is started, the new item „Load indicators” will be available in the context menu of either

 
  • the production order lines
  • an operation
  • any place in the diagram (see screenshot below). 

Visual Production Scheduler for Microsoft Dynamics NAV Feature load indicators

After having clicked „Load Indicators“, exactly the object/s for which you called the context menu will be highlighted (see screenshot at the top).  

„Load indicators“ changes to „Save and load indicators“ when the planner interactively changes the planning table without saving the data afterwards. This is due to the fact that the indicator only gets updated upon loading the data und not automatically during the interaction.

More information

 „How to use indicators“, available in the partner portal.

 Webinar on the Visual Production Scheduler.

Topics: Business Central Production Scheduling, Dynamics NAV Visual Scheduling Add-in