pb BarTender

xiaoxiao2021-02-28  66

PB調用BarTender 打印機,打印標簽紙方法:

 

string ls_path OleObject barcode_object,barcode_format barcode_object = Create OleObject barcode_format = Create OleObject

//Choose Case li_format //  Case 3    //称ゴ计沮  IF barcode_object.ConnectToNewObject("BarTender.Application") <> 0 then     Destroy barcode_object;     Destroy barcode_format;     MessageBox(title, 'ゼ杆ゴ祘',StopSign!)     return 0    End if        ls_path = "C:\Users\210256\Documents\BarTender\BarTender Documents\test1.btw"    //barcode_format = barcode_object.Formats.Open(getcurrentdirectory()+'\'+ls_docname_btw,false,'')    barcode_format = barcode_object.Formats.Open(ls_path,false,'')    long ll_row,ll_rows    ll_rows = ids_labtext.rowcount()       for ll_row = 1 to ll_rows   //    barcode_format.SetNamedSubStringValue('testpic','E:\pb6s\ts\'+lds_sto.getitemstring(ll_row,'bmpnm'))         //    barcode_format.SetNamedSubStringValue('aaa',lds_sto.getitemstring(ll_row,'barcode'))       barcode_format.SetNamedSubStringValue('COMPANY',ids_labtext.getitemstring(ll_row,'company'))          barcode_format.SetNamedSubStringValue('DATE',ids_labtext.getitemstring(ll_row,'print_date'))       barcode_format.SetNamedSubStringValue('ROLL_NO',ids_labtext.getitemstring(ll_row,'roll_no'))            barcode_format.SetNamedSubStringValue('BATCH_NO',ids_labtext.getitemstring(ll_row,'batch_no'))         barcode_format.SetNamedSubStringValue('ORDER_NO',ids_labtext.getitemstring(ll_row,'contractno'))                   barcode_format.SetNamedSubStringValue('UCC_NO',ids_labtext.getitemstring(ll_row,'ucc_no'))        barcode_format.SetNamedSubStringValue('WIDTH',ids_labtext.getitemstring(ll_row,'width'))        barcode_format.SetNamedSubStringValue('LENGHT',ids_labtext.getitemstring(ll_row,'lenght'))             barcode_format.SetNamedSubStringValue('G_WEIGHT',ids_labtext.getitemstring(ll_row,'g_weight'))                   barcode_format.SetNamedSubStringValue('N_WEIGHT',ids_labtext.getitemstring(ll_row,'n_weight'))        barcode_format.SetNamedSubStringValue('COLOR1',ids_labtext.getitemstring(ll_row,'color'))        barcode_format.SetNamedSubStringValue('COLOR2',ids_labtext.getitemstring(ll_row,'color1'))        barcode_format.SetNamedSubStringValue('COMBO',ids_labtext.getitemstring(ll_row,'combo'))             barcode_format.SetNamedSubStringValue('STRUCTURE',ids_labtext.getitemstring(ll_row,'structure'))             barcode_format.SetNamedSubStringValue('STRUCTURE1',ids_labtext.getitemstring(ll_row,'stucture2'))                      barcode_format.SetNamedSubStringValue('CLIENT',ids_labtext.getitemstring(ll_row,'client'))       barcode_format.SetNamedSubStringValue('CLIENT_NO',ids_labtext.getitemstring(ll_row,'client_no'))             barcode_format.SetNamedSubStringValue('CLIENT_COLOR',ids_labtext.getitemstring(ll_row,'cli_color1'))                  //  barcode_format.       barcode_format.PrintOut(0,0)    next //case 4 //  //END CHOOSE barcode_format.Close(1) barcode_object.Quit(1) Destroy barcode_object; Destroy barcode_format; return 1

 

转载请注明原文地址: https://www.6miu.com/read-50597.html

最新回复(0)