跳至主內容

搜尋

搜尋

Clipboard Image Barcode Hiding

評論

6 條評論

  • Avatar
    Legacy Poster
    Hmm. I wonder if you could script a white box to expand in size based on your VB script, which would then cover the barcode you don't need.
    0
  • Avatar
    Shotaro Ito
    Hi Stephen,
    VBScript OnNewRecord event only runs while printing, so not executed when exporting image.
    If you give empty value ("") to barcode, the barcode won't be shown.

    When you want to hide a barcode when datasource is "0", in the Barcode datasource's more options > VB Script > OnProcessData event,
    [code]
    If Value = "0" Then Value = ""
    [/code]

    (substring value cannot be updated from OnNewRecord, OnSerialize and OnIdenticalCopies events in Label Format option script - but, object visibility cannot be set from substring based VB Script like OnProcessData event)
    0
  • Avatar
    Legacy Poster
    I started there. The barcode is a PTI composite barcode and so its value is never really "0". The "0" Quantity value is a piece of the composite source. From the a member of a group of composite substrings, is there a way to address the related object. All of the object properties seem to be read only.
    0
  • Avatar
    Legacy Poster
    For anyone that is having a similar issue, I've resolved my issue thanks to a conversation with some excellent support folks. I changed from generating the image on the clipboard (document.ExportImageToClipboard) , to generating it to a temp file (document.ExportPrintPreviewToFile). The file generation method runs my VB scripts, the clipboard method doesn't. A couple of cautions, the document.ExportPrintPreviewToFile method takes a filename as a parameter and then generates a filename with a "1" appended to it before the file extension. This is not easy to see if you're generating your filenames via GUIDs. I'm using a temp directory for those files, which need to be cleaned up somehow via some code or the OS/Utilities.
    0
  • Avatar
    Shotaro Ito
    Thanks for posting the good solution!
    You right, document.ExportPrintPreviewToFile would run VB scripts just like BarTender's print preview does.
    One note - [u]ExportPrintPreviewToFile is supported by Enterprise Automation edition only[/u], so anyone on BarTender trial, that is one indicator to pick Enterprise Automation edition over Automation edition.
    0
  • Avatar
    Legacy Poster
    Okay, I'm stumped. Where in the BarTender 10.0+ UI do find events and their related scripts? I have some, but I can't find them any more :-).
    0

登入寫評論。