PdcMaterialList.Add: Difference between revisions

From External Bemet Wiki
Jump to navigation Jump to search
Created page with "== Declaration == Add(MaterialNo as String) as PdcMaterial == Description == Returns an added material object with the supplied number == Notes == This property adds a ..."
 
No edit summary
 
Line 13: Line 13:
<source lang="vb">
<source lang="vb">
dim objCalc
dim objCalc
dim objMat 


dim objMat  set objCalc = pdc.ActiveCalculation
  set objCalc = pdc.ActiveCalculation
   Set objMat = objCalc.MaterialList.Add("12345")
   Set objMat = objCalc.MaterialList.Add("12345")
   If IsValid(objMat) Then
   If IsValid(objMat) Then

Latest revision as of 08:23, 4 January 2013

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