PdcMaterial.SetCertificate

From External Bemet Wiki
Jump to navigation Jump to search

Declaration

SetCertificate(Value as Boolean) as long

Description

Changes the property 'setcertificate

Notes

If the material is not a subcalculation, not a stocked item, this method set or resets whether the material's purchase requires a certificate.

Code example

This code example sets certificate flag for the material. In case the material is a stocked item in this calculation, pdc.LastError is populated in this method.

dim objCalc
dim objMat
dim i

  set objCalc = pdc.ActiveCalculation
  for i = 0 to objCalc.MaterialList.Count - 1
    set objMat = objCalc.MaterialList(i)
    objMat.SetCertificate(1)
    msgbox pdc.lasterror
    end if
  next
  objCalc.Save

Availability

Available since June 2008 (from version 3.8)