What information are you gathering to enter into the barcode generator? How is it stored in your CAD data? I'll hazard a guess that they are inside Custom properties?
You can use the CustomPropertyManager to read and write custom properties for parts, drawings, assemblies.
In your manual process, how are you inserting the bar codes? Are they images or some sort of DXF line file?
If it is an image, you could use the barcode software to save the image and then import that image into your drawing - I would suggest giving the barcode images unique file names.
You can create SketchPicture objects by specifying a path to an image file (tif, bmp, jpeg, etc) and an insertion point on the sheet sketch.
If it exports something like a DXF, I'm not personally familiar with how those are imported into a drawing but I'm sure there is a way of doing that.
The meat of your question lies in between these two tasks. You want to run your Barcode generator programmatically.
This is a matter of investigating what API (if any) your barcode software exposes. In the ideal case, it would be a matter of adding their libraries in the macro's reference list, and calling whatever functions they provide with the information that you gather from your SolidWorks model. This can all be done in one SolidWorks macro. However, if they don't provide any of that, you may have to get creative. At the very least, you can play around with the command line to figure what arguments can be passed to the executable.
Assuming your bar codes are industry-standard Code 39 type, there are TrueType fonts available for free download that create bar codes directly from plain text. Just add a note on your template, link it to custom property, and change the font type to that font.
One caveat: If you send your drawing files to someone who doesn't have that font installed, the note will revert to the default font for the drawing.
That would be an excellent solution however I am using QR codes (2D barcodes). If you know of any TrueType fonts that create QR codes directly from plain text please let me know.
try #TASK . There is a task in the library which generates and adds QR codes in batch (for thousands of drawings).
As an input can be used a custom property, conisio url from ePDM, drawing path, name....
Hope this helps