PdcMaterial.ID

From External Bemet Wiki
Jump to navigation Jump to search

Declaration

ID as long

Description

Returns the ID

Notes

This property returns (i.e. READ ONLY!) the material's ID in the database. This corresponds with the DM_MATLINES.DM_ID field.

Code example

This code example opens a calculation, loops through its materials and returns the ID for each of them.

dim objCalc

  set objCalc = pdc.OpenCalculation("00685")
  for i = 0 to objCalc.MaterialList.Count -1
    set objMat = objCalc.MaterialList(i)
    msgbox "Material's ID: " & objMat.ID
  next

Availability