You can set up trace fields for your barcodes in the Settings screen. This exposes a range of characters from your barcode and assigns them to a trace field name that you can use in your measurement routine.
From the Settings screen, under the Barcode section, under Trace Fields, click Add Trace Field.
In the new row that appears, type the value for the From box and for the To box to define a range of characters.
In the third box to the right, type the trace name.
In your measurement routine, query the trace field to access its value.
Suppose your barcodes use an 18-character barcode format similar to this:
PART1-IT-0039-8765
Next, suppose you add this trace field, and you give it a name of TRACE1:
From: 7 To: 13
When passed to your measurement application, the trace field, TRACE1, would contain the value of "IT-0039". In PC-DMIS you can get the value by using the name of the trace field in an expression, such as a COMMENT command, like this:
COMMENT/OPER,NO,FULL SCREEN=NO,AUTO-CONTINUE=NO,
This is the barcode:
TRACE1