Bar Graph in Bartender Folgen

0

I'm in need of printing a bar graph, similar to the energy guide label on appliances in the US.  It needs to have an efficiency scale(0-100), then be able to draw a bar to the correct length based on a substring.  I also need to put in an arrow at that end of the bar and a number above the arrow from a different substring.  Hopefully this makes sense.  The graph here: https://www.burgesons.com/how-to-read-the-energyguide-label  is a good example of what I am looking to do.

I'm using Bartender 2016, with Enterprise Automation.

Is this possible in Bartender?  I'll be printing several hundred different labels per week so looking to automate as much as possible.  I already have a cusotm VB program to inout the data in substrings, just can't figure out a good way to create the graph, draw the bar, and move the arrow to the correct place.

Any help is much appreciated.

 

Rich

2 Kommentare

0
Avatar
Pete Thane
Aktionen für Kommentare Permalink

Hi Richard,

Not sure exactly, but I think you will need to use the FormatObject method to adjust the  length of the bar and arrow position etc.

I added this code to the VB Script area in the File>BarTender Document Options under OnNewRecord and when you print with this you are requested to enter a value on a Data Entry Form and this becomes the length of the line on the label.

--------

Select Case Format.Objects("PrintGo").Value
Case "Print"
Format.Objects("VarieLine").Length = Format.Objects("ManualLen").Value

Case "NoPrint"
Format.Objects("VarieLine").Length = 0

End Select .

Where

the named field PrintGo just has the word Print in it (#see below)

VarieLine is the name of a line on the label

ManualLen is a text field on the label link to a DataEntryForm text box 

---------

If you open up the Template Object section in the VB screen you can then "drill down" and format various settings using this method so hopefully you will be able to work out how to create the variable length bar and arrow positioning although you will probably need to make a static image of the scale itself that the bar "runs" along the top of.

I hope this helps

Pete

 

# There is probably a different way to do this but I knew if I used the Case command I could get the selection to change when I wanted even though I was not planning to change the value of PrintGo anyway.

 

 

 

0
Avatar
Richard Belknap
Aktionen für Kommentare Permalink

Peter,

 

This works great.  This is a big help in moving along my project.

 

Thanks,

 

Rich

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.