Community

.Net Scripting in ScanStation Answered

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

Was this article helpful?

0 out of 0 found this helpful

Comments

1 comment

  • Avatar
    Pascal Kubenka

    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;

    }

    }

    }

    }

    }

    0

Please sign in to leave a comment.