PdcCalculation.RecalcDatesPerOperation: Difference between revisions

From External Bemet Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
== Declaration ==
== Declaration ==
RecalcDatesPerOperation()
RecalcDatesPerOperation(calculateSubs: Boolean)


== Description ==
== Description ==
Recalculates the start date for all operations in the calculation, this includes any subcalculations.
Recalculates the start date for all operations in the calculation, the parameter can be set to True to includes any subcalculations.


== Notes ==
== Notes ==
This method will recalculate the start date for alle operations and then refresh the form. The calculation will still need to be saved afterwards.
This method will recalculate the start date for alle operations and then refresh the form. The new dates are updated in the database.


== Code example ==
== Code example ==
Line 13: Line 13:
<source lang="vb">
<source lang="vb">
PDC.App.ActiveCalculation.OperationList.InsertLineNumber(PDCEXT.pdcOperationKind.pdcInternalOp, "FR001", 15)
PDC.App.ActiveCalculation.OperationList.InsertLineNumber(PDCEXT.pdcOperationKind.pdcInternalOp, "FR001", 15)
PDC.App.ActiveCalculation.RecalcDatesPerOperation()
PDC.App.ActiveCalculation.RecalcDatesPerOperation(True)
PDC.App.ActiveCalculation.Save()
PDC.App.ActiveCalculation.Save()



Latest revision as of 11:34, 15 April 2024

Declaration

RecalcDatesPerOperation(calculateSubs: Boolean)

Description

Recalculates the start date for all operations in the calculation, the parameter can be set to True to includes any subcalculations.

Notes

This method will recalculate the start date for alle operations and then refresh the form. The new dates are updated in the database.

Code example

This code example is will take the active calculation, that has a production number reserved, and adds a new operation that will not have a start date. Then by calling the function it will recalculate the start dates.

PDC.App.ActiveCalculation.OperationList.InsertLineNumber(PDCEXT.pdcOperationKind.pdcInternalOp, "FR001", 15)
PDC.App.ActiveCalculation.RecalcDatesPerOperation(True)
PDC.App.ActiveCalculation.Save()

Availability

2024.2.3.0