ns=2;s=DEPRAG Smart/Local/Print/PrintFile
Allows to print any files on the default printer set on the system.
In addition to the parameters already explained, the following variables must be created / transferred for the implementation in TwinCAT 3:
VAR
bPrintFile : BOOL;
OutputDataPrintFile : ST_PrintFileOutputData;
hrPrintFile : HRESULT;
fbPrintFile : FB_Print;
END_VAR
hrPrintFile := fbPrintFile.PrintFile(
bExecute := bPrintFile,
ConnectionHandle := depragSmartConnection.ConnectionHandle,
FullFileName := 'C:\Test\Doc1.docx',
LengthOfFullFileName := SIZEOF('D:\Test\Doc1.docx'),
OutputData => OutputDataPrintFile);
IF hrPrintFile <> S_FALSE THEN
bPrintFile := FALSE;
END_IF
For examples and explanations regarding the calls of nodes via Siemens TIA Portal please refer to the sub-menu "Siemens TIA Portal" in section "Getting Started".