PdcMaterialList.Add

From External Bemet Wiki
Jump to navigation Jump to search

Declaration

Add(MaterialNo as String) as PdcMaterial

Description

Returns an added material object with the supplied number

Notes

This property adds a material to the current calculation.

Code example

This code example adds a material to the active calculation.

dim objCalc
dim objMat  

  set objCalc = pdc.ActiveCalculation
  Set objMat = objCalc.MaterialList.Add("12345")
  If IsValid(objMat) Then
    msgbox "material added succesfully"
  Else
    msgbox "Error adding material"
  End If

Availability