How To Convert Hex And Decimalist In Same One Label Program Follow

0
Avatar
Legacy Poster

Hi
I am using BarTender 8.0, now we need print both hex serial number & decimalist serial number in one label. how to achieve conversion them on keep the equal value? hope i can get expert's reply, thanks

Example
FA YY WW 00011 Decimalist serial number(5 digits Decimalist number)
FA YY WW 000B Hex serial number (4 digits Hex number)

2 comments

0
Avatar
Ian Cummings
Moderator
Comment actions Permalink

1. Create a decimal serial number like you would do normally. Make sure the "Data Source" dialog is in Advanced mode so that you can also specify a "Share Name" to the data value. In this example I name it: btSerial

2. Create a second object that uses an event based VB Script for the data source. Edit the VB Script and in particular specify the below expression for the OnSerialize event.

value = Hex(Format.NamedSubStrings("btSerialNo").Value)

For BarTender v8.0 you might need to specify the below if the above doesn't work.

value = Hex(btSerialNo)

You should also set the value of the object via the OnAutoSelectedEvent event.

value = Format.NamedSubStrings("btSerialNo").Value

or

value = btSerialNo

3. Note that the Professional edition or above is needed for this solution.
0
Avatar
Legacy Poster
Comment actions Permalink

Hi Ian C
Thanks a lot, we resolved this problem now.

Best regards
Hans

Please sign in to leave a comment.