Cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted

Output a # symbol with MOM_output_literal

Genius
Genius

I am trying to output a line in a post that contains a Fanuc Custom Macro B system variable check, "IF [#4120 EQ 0] GOTO 1 (IF HEAD TOOL IS 0, SKIP TO N1)". But of course the # is a comment in TCL, so Postbuilder won't accept it in that format without an error. According to the TCL documentation that I read a \ symbol in front of the # should disable the original meaning of the #, which Postbuilder will accept but when posting it still throws an error saying the #4120 is an invalid command. Does anyone know of a way to accomplish this?

Mike Diamond, CNC Programmer, Orizon Aerostructures Inc.

Production: NX10.0.3.5, Vericut 7.4.1, ICAM V21
Development: VB.NET, Tcl/Tk
Testing: NX11
2 REPLIES

Re: Output a # symbol with MOM_output_literal

Esteemed Contributor
Esteemed Contributor

You need the \ in front of the "square brackets":

 

IF \[#4120 EQ 0\] GOTO1 (IF HEAD TOOL IS 0, SKIP TO N1)

You may need to remove the space after the GOTO (I think I've run across controls that don't like it)

 

 

The issue with the "#" is that "[]" means "treat the enclised text as a command". e.g.

 

set my_value [format "%.4f" $mom_pos(0)]

 

So to have the "[]" output as chanracters (instead of treating the text as a command) you have to escape them.

 

Ken

Ken Akerboom Sr CAx Systems Engr, Moog, Inc.
Production: NX10.0.3.5 MP5 + patch/TC11.2
I'd rather be e-steemed than e-diseaseled


Re: Output a # symbol with MOM_output_literal

Genius
Genius

Perfect! Thanks Ken

Mike Diamond, CNC Programmer, Orizon Aerostructures Inc.

Production: NX10.0.3.5, Vericut 7.4.1, ICAM V21
Development: VB.NET, Tcl/Tk
Testing: NX11

Learn online





Solution Information