Showing results for 
Search instead for 
Do you mean 
Reply

Parse error PB []

Hello,

 

I want output "G110 [B] 2" in the nc code.

When I write  MOM_output_literal "G110 \[B\] 2" in Postbuilder it gives me parse error.

 

any idea to make it work?

 

thank you

---------------------------------------------
#♫ PB, 5ax, itnc, nx, vericut ♫ #
7 REPLIES

Re: Parse error PB []

The front bracket probably works the way you have it. The back one may require creating a variable to contain "\]" and use that instead.

NX10.03
Windows 7 Pro

Re: Parse error PB []

[ Edited ]

global k
set k "\]"
MOM_output_literal "G110 \[B$k 2"

it doesnt work too.

Now, I am looking for any solution to output : G110 [B] 2

 

---------------------------------------------
#♫ PB, 5ax, itnc, nx, vericut ♫ #

Re: Parse error PB []

Which version of Post Builder?
I just tried: MOM_output_literal "G110 \[B\] 2"

in PB 11, and it works OK

Marek Pawlus, NCmatic

Production: NX 11.0.1
Development: C#, Tcl/Tk, CSE

Re: Parse error PB []

I have to apologise.

 

 MOM_output_literal "G110 \[B\] 2" works.

 

Parse error was in another line.

thank you.

later I will delete this thread.

---------------------------------------------
#♫ PB, 5ax, itnc, nx, vericut ♫ #

Re: Parse error PB []

My comment was for if you are trying to get it through a block template def in the def file. MOM_output_literal has less constraints.

NX10.03
Windows 7 Pro

Re: Parse error PB []

the second "backslash" can be ignored...

\[B]

works too

@mkn

Re: Parse error PB []

Nice - I will have to note that.

NX10.03
Windows 7 Pro

Learn online





Solution Information