How to use CommandDataReplace

Label printing integration (NiceWatch middleware and ActiveX programming interface)

Moderators: Georges, milos, NiceLabel Support Team

Post Reply
dkupersdeqit
Newcomer
Posts: 2
Joined: Thu Nov 05, 2020 3:58 pm

How to use CommandDataReplace

Post by dkupersdeqit » Thu Nov 05, 2020 4:17 pm

Hi,

Can somebody help me with the CommandDataReplace-function (part of the SatoPrinterAPI DLL)?

The documentation (UM_SATOPrinterAPI_EN_3.0.pdf) states: '... Mainly use for PRN template file and it created by Nice Label Software...'.
I've created a label in NiceLabel 19.2.1b5400 Pro trial and:
- created a variable ('TestVar') with a value ('testing123')
- created a variable ('@TestVar@') with a value ('testing456')
- placed it on the label
- printed to a PRN-file.
As to be expected, the text 'testing123' and 'testing456' can be found in the PRN-file, but not the variable-name ('TestVar' or '@TestVar@'). The CommandDataReplace-function does, of course, nothing.

So, I guess my question is: how to create a proper PRN-file with variables, and not the contents of the variables? NiceLabel only offers to safe (protected) nlbl-files which the CommandDataReplace-function doesn't read.

Thanks in advance,
Dethmer.

User avatar
Kyleodonnell
NiceLabel Support
NiceLabel Support
Posts: 720
Joined: Mon Aug 28, 2017 3:07 pm

Re: How to use CommandDataReplace

Post by Kyleodonnell » Thu Nov 05, 2020 6:03 pm

Dkupersdegit

You would have to manually replace the values in the prn with whatever variables you wish or instead of typing data into your variables simple just use @Testvar or whatever your variable name is as the input. The software does not generate the label with the variable names, it just generates the label and the data that will be in it.

dkupersdeqit
Newcomer
Posts: 2
Joined: Thu Nov 05, 2020 3:58 pm

Re: How to use CommandDataReplace

Post by dkupersdeqit » Fri Nov 06, 2020 10:01 am

Hello Kyle,

Ah, that makes things clear. Got it working now.

thanks for the fast reply!

Greetings,
Dethmer.

Post Reply