Some content on this site is available only to logged-in subscribers. Contact Us for information on becoming a subscriber.

InSource.Solutions | InSource Training | InSource Client Portal
InSource Solutions Logo
Log In Sign Up
InSource.Solutions InSource Training InSource Client Portal Log In Sign Up
  • Home
  • AVEVA MES & Model Driven MES
  • AVEVA MES Tech Notes

TN MES109 Example API Call to Read Lot Attribute Data in MES

Last updated: March 11th, 2025

Description

  • Author: Brian Schneider
  • Published: March 11th, 2025

Details:

Description

This article from InSource Provides an example script to read a Lot Attributes data in Wonderware MES using the Stateless API. 

  • Author: Michael Walker
  • Published: 09/25/2015
  • Applies to: Wonderware MES 2014 and Later

Details

Below is the example script. Note the To Do comments to make the script functional. 

try;
''declarations
dim oResult as aaMES.Result;
dim ItemID as string;

dim LotNo as string;
dim Attr as string;
dim oDS as System.Data.DataTable;
dim oDR as System.Data.DataRow;
''To Do - Set ItemID, Attr and LotNo strings here!

oResult = aaMES.Prod.aaLotAttr.GetAttrs(ItemID,LotNo,"Admin");
if (oResult.Success == true) then
oDS = oResult.DataSet_Value.Tables(0);
if oDS.Rows.Count > 0 then
for each oDR in oDS.Rows();
if oDR["attr_desc"] == Attr then
logmessage( oDR["attr_value"].ToString()); 
''To Do - Set Object Attibute or other data here to return from API Call!
endif;
next;
else
endif;
else
endif;
catch;
LogError(error.Message.ToString());
LogError(error.InnerException.Message.ToString());
endtry;

 

retrieve lot attribute data
Give feedback about this article

Recommended articles

How to receive group emails

Read More
Support Icon

CONTACT SUPPORT

How to reach us

10800 Midlothian Turnpike Tpke, Suite 209, Richmond, VA 23235

1.877.INSOURCE

Technical Support - 1.888.691.3858

Contact Us

  • InSource Solutions
  • InSource Training
  • InSource Client Portal
  • Log In
InSource Solutions Logo

© 2025 InSource Solutions. All Rights Reserved.

Knowledge Base Software powered by Helpjuice

Expand