Postprocessor: Write \ to programm

Postprocessor: Write \ to programm

llBF3HG
Observer Observer
74 Views
1 Reply
Message 1 of 2

Postprocessor: Write \ to programm

llBF3HG
Observer
Observer

Hello 

 

I would like to write the following code at the end of all my programs.

CYCL DEF 12.0 PGM CALL
CYCL DEF 12.1 PGM tnc:\allgem\programm-ende.h
CYCL CALL

 

I inserted the following code in the function "onClose"

writeBlock("CYCL DEF 12.0 PGM CALL");
writeBlock("CYCL DEF 12.1 PGM tnc:\allgem\programm-ende.h");
writeBlock("CYCL CALL");

Output of the Postprocessor is:

CYCL DEF 12.0 PGM CALL
CYCL DEF 12.1 PGM tnc:allgemprogramm-ende.h
CYCL CALL

 

So we are missing all the "\"

 

How can I edit the Post to include "\"?

0 Likes
Accepted solutions (1)
75 Views
1 Reply
Reply (1)
Message 2 of 2

viacheslav.shapilov
Autodesk
Autodesk
Accepted solution

In JavaScript string literal you need to use double slash `\\` to output it. Because it is escape character that is used to enter special characters into strings. 


Viacheslav Shapilov
Developer Technical Services
Autodesk Developer Network