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

Post Builder word separator except on last element

Phenom
Phenom

using word sepator "'," (comma) & No word separator on Leading Text "LIN \{"

I can get this output

 

LIN {X -456.884,Y -211.379,Z 424.808,A 88.858,B -70.724,C 1.078,E1 60.,}
LIN {Z 244.834,}
LIN {X -456.926,Y -212.442,Z 241.648,}
LIN {X -457.245,Y -212.819,Z 238.326,}
LIN {X -457.826,Y -212.492,Z 235.034,}
LIN {X -458.64,Y -211.476,Z 231.937,}
LIN {X -459.645,Y -209.824,Z 229.191,}
LIN {X -460.792,Y -207.617,Z 226.934,}
LIN {X -462.023,Y -204.967,Z 225.277,}
LIN {X -462.097,Y -204.798,Z 225.199,A 88.828,B -70.736,C 1.106,}

I would like to remove the "," comma befor the "}" close brace.

 

Thanks

 

Alex

 

 

6 REPLIES 6

Re: Post Builder word separator except on last element

Phenom
Phenom

Hi @agrivas ,

Can you show us your proc ?

Production: NX11.0.2.7,VERICUT 8.1.2
Development: Tcl/Tk, Gnuplot
www.adgroupe.com

Re: Post Builder word separator except on last element

Phenom
Phenom

@mkn no proc, all done in word & block definitions.

Not at my PC now, I will add some screen shots of post builder when I get a chance

 

Re: Post Builder word separator except on last element

Phenom
Phenom
I am assuming that you use a text element on the "}" which is considered another word in the block to separate. One way to get what you want would be to create one "macro" for output (abandon block.) Another way would be to modify PB_CMD_before_output and search for this text in mom_o_buffer and replace in this situation. You may also be able to set the "}" as trailer text in the last address on the block.
NX12.02
Windows 10 Pro

Re: Post Builder word separator except on last element

Phenom
Phenom
@mkn no proc, all done in word & block definitions. 

ok , I can't help you in this case

Production: NX11.0.2.7,VERICUT 8.1.2
Development: Tcl/Tk, Gnuplot
www.adgroupe.com

Re: Post Builder word separator except on last element

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

I'm thinking as well to remove the "}" from the block definition, and add set the "end of block" character to "}".

That way it is not a separate "word".

 

If some lines need it, and some don't, I would leave it off and use PB_CMD_before_output to add it if it finds a "{" somewhere on the line. 

Or (if you can) use MOM_output_text to output lines that do NOT need the "}"

 

NOTE: I tested PB10/NX10.0.3, and while you can set the "end of block" character to "$test", NX does NOT do variable substitution on that string - it literally outputs:

%$test
N0010 G40 G17 G90 G70$test
N0020 G91 G28 Z0.0$test

So you can't try to use a variable to set this...

 

 

 

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


Re: Post Builder word separator except on last element

Phenom
Phenom

Thanks to all.

I can get the output if I use "}" as end of block however there are other words after the close brace that do not require "," word separators.

 

It looks like editing the buffer is best option.

 

The CAM Robotics KRL post output is like this however everthing is encrypted !@#$%

Learn online





Solution Information