Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Batch Management

Example

  • Last UpdatedAug 18, 2016
  • 1 minute read

The following sample C# code illustrates how to define, query, and use the wwMaterialCLBs object.

The example populates a list of ingredients, populates a list of units to which the material has been assigned whenever a material is selected, and finally populates a list of lot tracking information defined for the selected unit. The global variables are defined so that they are available throughout the entire program.

private void LoadLotTrackingValues()

{

wwMaterialUnits LocMatUnits;

wwActualChar MatActualChar;

wwActualChars MatActualChars;

short retval = 0;

string strCampaign=lotTrackingLsv.SelectedItems[0].SubItems[1].Text;

string strLot = lotTrackingLsv.SelectedItems[0].SubItems[2].Text;

string strBatch = lotTrackingLsv.SelectedItems[0].SubItems[3].Text;

LocMatUnits = GetMatUnits();

if (LocMatUnits == null)

return;

for (int ut = 1; ut <= LocMatUnits.Count; ut++)

{

MatUnit = (wwMaterialUnit)LocMatUnits.Item(ut);

if (UnitsLsb.Items.Count > 0)

if (MatUnit.UnitName == "testUnitName1"

break;

}

MatUnit.QueryCLBs();

MatClbs = (wwMaterialCLBs)MatUnit.MaterialCLBs;

for (int i = 1; i <= MatClbs.Count; i++)

{

MatClb = (wwMaterialCLB)MatClbs.Item(i);

if(MatClb.LotID= "TestLotid")

break;

}

retval =MatClb.ChangeMaterialQuantity(99.9); }

TitleResults for “How to create a CRG?”Also Available in