.Net Scripting in ScanStation

  • 467 Views
  • Last Post 29 April 2019
  • Topic Is Solved
Kubenka posted this 09 April 2019

How can I call document-specific parameters like the recognized barcode in a .NET script of the scan station?

Batch parameters are not a problem, but I currently have a blackout.

A simple example would be great

Kubenka posted this 29 April 2019

foreach (IWorkspaceItem d in Workspace.ActiveBatch.Children)

{

if (d.IsDocument)

{

string barcode = d.DocumentInfo.Barcode; if (!d.DocumentInfo.RegistrationProperties.Has("scst_documentBarcode"))

{

d.DocumentInfo.RegistrationProperties.Add("scst_documentBarcode");

}

if(d.DocumentInfo.RegistrationProperties.Count>0 && d.DocumentInfo.RegistrationProperties.Has("scst_documentBarcode"))

{

foreach (IRegistrationProperty p in d.DocumentInfo.RegistrationProperties)

{

if (p.Name == "scst_documentBarcode"&& barcode !="")

{

p.Value = barcode;

}

}

}

}

}

Close