Century Systems, Inc. - Save Money. Print Better.

Home Products  Tech Support  About Century
  Contact Us  Search  Site Map  Reseller Login
Become a Century Partner
Where to Buy

2629 Valley Pike, P.O. Box 175, Dayton, OH 45404
 1-800-228-3606
or 1-937-237-2001  Fax: 1-937-237-1595

Controlling the Bar Tender
From Within Other Programs
Brochure   Specs & Feature Summary   History of Features    Controlling Bar Tender From Other Programs   Tutorial: Design A Label in 5 Minutes

The Bar Tender is more than just a highly flexible, stand-alone labeling package.  It can also be controlled from within your other programs.  So your accounting, manufacturing, inventory, shipping and other supply chain applications (running stand-alone or across the enterprise) can easily access the Bar Tender´s powerful label features.  In fact, your users don't even have to know that it's the Bar Tender doing the label printing instead of your other programs!

Depending on your goals and the capabilities of your other programs, there are three basic ways to control the Bar Tender (all discussed below):

(Click here for information on importing label data from databases and spreadsheets.)


Professional Integrator Version vs. Other Bar Tender Versions


The
ActiveX Automation and Data Detector methods discussed below for controlling the Bar Tender are only supported by the Professional Integrator version.  The Command Line Parameter method is supported by all Bar Tender versions.
 

ActiveX Automation


ActiveX (formerly known as OLE) is a Microsoft standard for communication between Windows programs.  The ActiveX Automation standard supported by the Professional Integrator version of the Bar Tender is a specific class of ActiveX that allows one program to control another.


What Can You Do With ActiveX Automation?

Any program that can issue ActiveX commands can automatically launch the Bar Tender into "the background" (where it stays "invisible" to your users).  You can then have your program specify one or more print jobs and then either close the Bar Tender when done or leave it open (ready to instantly process the next print job request).

A wide variety of functions are available for interfacing to and controlling the Bar Tender.  You can:

  • Load the Bar Tender
  • Load multiple label formats
  • Control selected Print dialog options, including:
    • Which printer to use
    • Whether or not to print to a file instead of the printer
  • Control selected Input Data dialog options
  • Transmit explicit  values for bar code and text objects (instead of or in addition to having the Bar Tender read this information from a data file)
  • Request Bar Tender version information
  • Find out if a print job is in progress
  • Close the Bar Tender
  • And more


What Kind Of Applications Can Issue ActiveX Commands?

Most standard Windows development tools can issue ActiveX Automation commands, including:

  • Visual Basic
  • Visual C++ (and other versions of C for Windows)
  • Power Builder
  • Access
  • and many more.

Many pre-written applications also provide an interface that gives users access to Windows´ ActiveX capabilities.  (Any application such as MS-Word or Excel that supports "Visual Basic for Applications" certainly will have that capability.)


Command Line Parameters


Although the Command Line method of controlling the Bar Tender uses somewhat older software technology than ActiveX Automation employs, it still allows programs to load the Bar Tender and define and launch print jobs.  And it doesn't require purchase of the Professional Integrator version.


What Kind Of Programs Can Issue Command Lines?

Almost any development environment is capable of issuing a command line.  As can any prewritten application with the ability to start up other programs.  (That is, provides some sort of "run" option.)


Sample Command Line

This is a sample command line that would be used inside of Visual Basic to launch the Bar Tender (if it's not already running), load a label format called "ucc-ean128.btw," and print it:

    Shell("bartend.exe  /f=ucc-ean128.btw  /p")

The "Shell" part is specific to Visual Basic and differs somewhat in other development environments.  The part inside the quotes is the actual command line and will not change for other environments.


What Can I Do and Not Do Using Command Lines?

Among the available functions are:

  • Load the Bar Tender
  • Select and load a label format
  • Specify a data source to import label data from
  • Execute a print job
  • Close the Bar Tender
  • Various other functions

Some capabilities not available when using command line control instead of ActiveX Automation are:

  • Direct control over selected options in certain dialogs.
  • Loading multiple label designs without first closing ones that have already been opened.
  • Asking the Bar Tender questions, including its version number and whether or not a print job is in progress.
  • The ability to specify label data directly (instead of having to export it to a file for the Bar Tender to read).


Data Detector: Data-driven integration for
the enterprise and stand-alone applications


The methods discussed above for controlling the Bar Tender involve passing one or more commands from another program to the Bar Tender for execution.  Sometimes, however, it's not convenient or even possible to control a Windows program in this manner.


When You Might Need Data Detector

Here are some challenges that Data Detector solves.

  • You don't know how to issue Windows commands from the program or environment you are using.
  • You are using a prewritten application which doesn't offer a "run" type of option and for which you can't access the source code.
  • Your program or development environment does not support the issuing of ActiveX commands or even command line parameters.
  • You are working with a non-Windows platform, such as Unix or AIX, and no means exist for directly transmitting the necessary command(s) to the Windows system running the Bar Tender.  (This is a very common scenario in the large enterprise environments used for supply chain management applications.)

How Data Detector Works

The Data Detector in the Professional Integrator version of the Bar Tender gives you control over your labeling with little or no changes to your current applications.  Here's how it works:

  • When your application needs labels, have it place a text file somewhere (of your choosing) on your network.
  • At predetermined time intervals (once again of your choosing), Data Detector checks to see if this file has suddenly appeared.
  • Once it does, Data Detector "wakes up" the Bar Tender and controls it for you (just as you would using ActiveX Automation or Command Line Parameters).

The beauty of this solution is that all your program has to be able to do is create a text file and place it somewhere on your network where the Bar Tender can "see" it.  This is an ideal solution for large, non-Windows enterprise systems where directly controlling a Windows program would be difficult, if not impossible.


Great For Windows-only Systems Too!

Although Data Detector's full benefit is achieved by giving Windows capabilities to non-Windows applications, such cross-platform operation is not required.  Data Detector is so easy to set up and use that some people use it in pure Windows environments so they don't have to code even the simplest ActiveX Automation or Command Line functions.

 

 


Home | Products | Technical Support | About Century | Contact Us | Search | Site Map | Terms & Conditions | Reseller Login
Give us your feedback, fill out a short survey
All Contents Copyright Century Systems, Inc. 2002-2008
Prices and availability subject to change without notice