Add "own" fields to header in command file 追蹤

0
Avatar
Michael Fallenbüchel

Experts,

is there a away to add "own" fields to the command file?

 

Example:

%BTW% /AF="\\XX\Layouts\label.btw" /D="%Trigger File Name%" /PRN="\\xx\printer" /P /DD /R=2
%END%

 

Now I want to print this file as a TIF to a folder. Possible using BTXML-script, like that

<?xml version="1.0" encoding="utf-8"?>
<XMLScript Version="2.0" Name="09232006_103601_Job1" ID="123">
<Command Name="Job1">
<ExportPrintPreviewToImage ReturnImageInResponse="true">
<Format>%Layout%</Format>
<RecordSet Type="btTextFile" AddIfNone="true">
<TextData><![CDATA[%Datei%]]></TextData>
</RecordSet>
<Folder>\\XXX\etikett\</Folder>
<FileNameTemplate>%DetectedFileNameWithoutExtension%.tif</FileNameTemplate>
<ImageFormatType>TIF</ImageFormatType>
<Colors>btColorsMono</Colors>
<DPI>150</DPI>
<Overwrite>true</Overwrite>
<IncludeMargins>true</IncludeMargins>
<IncludeBorder>true</IncludeBorder>
<BackgroundColor>16777215</BackgroundColor>
</ExportPrintPreviewToImage>
</Command>
</XMLScript>

 

Working perfect, TIF is saved on folder \\XXX\etikett\

 

Now I want to make this "dynamic", mean I want to send the folder as well in my integration file and then save to s specific folder...

 

How to do that? Somehow I need to send this information in the header of my trigger file? Any ideas?

4 意見

0
Avatar
Pete Thane
評論操作 永久連結

Not sure what you mean, instead of printing you want to convert the label image into a Tif?

Just looking at the file,I  am sure the R=2 is incorrect and it should be R=3 as that is telling Commander that the data starts on line two which is were the %END% closing "bracket" is and not the data. I had one at a customer's site recently where they had missed this completely and although Commander ignored this the file failed using Integration Builder and so I had to build in a Search and Replace Action to add this in before the Commander Script command was actioned. They had also missed off /DD and so had a folder or over 750K old trigger files sat taking up space and slowing down the process too and so the Search and \Replace included adding the delete fiel when done too. 

With Integration Builder a number of elements that used to be included in the command string (between the %BTW% and %END% can now be referenced as part of the data string itself and this can include the names of the labels format and printer etc.  . 

0
Avatar
Michael Fallenbüchel
評論操作 永久連結

Hi Pete,

 

I have no problem with my trigger file, all commands are working as expected (R=3 was not working due to "I don't know anymore", that's why we switched back to R=2).

I only need an option to add the output folder for my TIF/PDF/... to the trigger file. Actualy, we use the hard coded (in bold is the output path)

<Folder>\\XXX\etikett\</Folder>

And I want to have this dynamic. If I use the command string the correct way, it is not possible (in my eyes), as every command is used for XYZ (printer, layout path, ...). So I need one more command. Maybe I am wrong, but I don't see any option to achieve this...

 

Regards

Michael 

0
Avatar
Michael Fallenbüchel
評論操作 永久連結

Got it!!!

If using a BTXML script, I can "do what I want"...in this case, I added on parameter in the header (/FOLD="path"), which is first stored in a variable, and then used in the script as output path.

 

Working, can be closed

0
Avatar
Pete Thane
評論操作 永久連結

No I dont think there is anyway to achieve that within the Command Script string. The only available commands for this can be found in the BarTender Help section if you search for  Command  Line Parameter Reference.

I wonder if you included the desired output folder path as one of the data fields on your label although not having it print but just have that field being logged to a text file (with no headers, footers or any other data). Presumably the TIFF/PDF output is saved to a fixed location and with a specific name. If this were the case you may be able to set up a second integration that triggers of the logged output and so the file path would be come the %Event Data% and you could perhaps use that to move the TIFF/PDF with the integration. 

登入寫評論。