PdcApplication.ReserveProductionNumber
Declaration
ReserveProductionNumber(CalcNumbers as IStrings,StartChars as String,PlanPrio as VT_INT,Children as Boolean,EndlessCap as Boolean,Compress as Boolean) as Boolean
Description
Reserves production numbers for the list of calculations provided
Notes
This method starts production provisionally, for a list of calculations.
The calculations must be closed before executing.
You can check this e.g. by using the Registered property of the calculation object.
CalcNumbers List of calculationnumbers that should be executed
StartChars Which startletter should be used
PlanPrio Which plan prio should be used
Children Also give subcalculations in production
EndlessCap Not used
Compress Not used
Code example
For the calculations 0801-000035 and 0801-000087 a production number is generated.
dim strlstCalcNumbers
Set strlstCalcNumbers = pdc.GetEmptyStringsList
strlstCalcNumbers.Add "0801-000035"
strlstCalcNumbers.Add "0801-000087"
If pdc.ReserveProductionNumber(strlstCalcNumbers, "", 0, False, False, False) Then
msgbox "Preserving the production number is completed."
else
msgbox pdc.LastError
end if
Availability
Available since March 2009 (From version 3.7).