Selecting Jpg Images With Vb Script
I am using BarTender Automation 9.4, build 2749
I have two JPG files, UpArrow.JPG and DownArrow.JPG
Depending on the value of the WAREHOUSELEVEL I should print the down arrow or the up arrow.
There are two warehouses but the lowest level is A in one warehouse and 1 in the other.
The VB Script is below.
The Path in the picture source is C:\temp\LPN\
The Data Source is WAREHOUSELEVEL
if Field(WAREHOUSELEVEL)="1" or Field(WAREHOUSELEVEL)="A" Then
value="UpArrow.JPG"
else
value="DownArrow.JPG"
end if
I have tried several versions of the script even using two objects on the label with the scripts to determine to print or not to print the object. Above is the latest script but this gives the error
"The script did not read from the "Value" property, which means..."
Please help.
Thanks,
Paul
-
Your general logic is correct. But I suspect there is a simple link missing somewhere. Can you attach the .btw file here for review?
0 -
Attached is the BTW file and a sample label printout. The data source is a SQL Query to the database.
Thanks,
Paul
0 -
What I would do, and it may not be the only way, is to make a text object *outside* of the printable area. This becomes basically your file name store.
Put your VB script in there as the source.
Then, link the picture file name to this outside text file.
0 -
I'll try that but because of the time pressure I made two formats, one with the down arrow and one with the up arrow. They work OK.
Thanks for your help.
Paul
0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
4 Kommentare