Author Topic: Printing to a Zebra Printer from AdvancedHMI  (Read 11399 times)

Godra

  • Hero Member
  • *****
  • Posts: 1447
    • View Profile
Re: Printing to a Zebra Printer from AdvancedHMI
« Reply #15 on: August 12, 2019, 10:10:35 PM »
Sprungmonkey,

Try the attached solution in VS 2013.
Make sure to install Net Framework 4.7.1 Developer Pack first (if you don't have it already installed).

Noe

  • Full Member
  • ***
  • Posts: 205
    • View Profile
Re: Printing to a Zebra Printer from AdvancedHMI
« Reply #16 on: August 15, 2019, 09:31:39 AM »
Sprungmonkey,

Try the attached solution in VS 2013.
Make sure to install Net Framework 4.7.1 Developer Pack first (if you don't have it already installed).

Thanks Godra! I will give a try as soon as I can.

bachphi

  • Hero Member
  • *****
  • Posts: 671
    • View Profile
Re: Printing to a Zebra Printer from AdvancedHMI
« Reply #17 on: January 05, 2020, 01:08:09 PM »
an improved version of Search & Replace:
===================================================
This is NOT alt.read.my.mind.
No such thing is sh^t-for-brains unless you are posting to alt.read.my.mind.
===================================================

bachphi

  • Hero Member
  • *****
  • Posts: 671
    • View Profile
Re: Printing to a Zebra Printer from AdvancedHMI
« Reply #18 on: February 20, 2020, 06:09:59 PM »
Another improved Search & Replace version (? may be not),
But it does give the flexibility of using different string size.




Code: [Select]
/********************************************************************
.NET equivalent of STRING.REPLACE
Search a string for a specified string and replace it
Added looping capability to replace more than one
Added passing different custom source string size
********************************************************************/

//Determine the size of the passed in array
SIZE(SourceArray,0,array_size);

FOR index:= 0 TO array_size-1 DO
COP(SourceArray[index],sSource.DATA[index],1);
END_FOR;
//
sSource.LEN:= array_size;

WHILE sSource.LEN > sSearch.LEN DO
FIND(sSource,sSearch,1,PosFound);
IF PosFound > 0 then
DELETE(sSource,sSearch.LEN,PosFound,sSource);
INSERT(sSource,sReplace,PosFound,sSource);
ELSE
EXIT;
END_IF;
END_WHILE;

FOR index:= 0 TO sSource.LEN-1 DO
COP(sSource.DATA[index],SourceArray[index],1);
END_FOR;

===================================================
This is NOT alt.read.my.mind.
No such thing is sh^t-for-brains unless you are posting to alt.read.my.mind.
===================================================