Cancel
Showing results for 
Search instead for 
Did you mean: 

Inserting a certain ASCII char to post output

Valued Contributor
Valued Contributor

Dear experts,

Does anyone happen to have a TCL code to insert special charachters with certain ASCII code in post output using post builder? All attempts end to output # instead of the defined charachter.

The charachter is □ (I am not sure how it looks like in this message but its actually a rectangle shape charachter)

Kind regards,

Majid

Majid
2 REPLIES 2
Highlighted

Re: Inserting a certain ASCII char to post output

Solution Partner Genius Solution Partner Genius
Solution Partner Genius

Majid:

 

It looks like you have an issue I ran into myself a while ago.  If the square box character you need is 25AF in hex then the normal methods of outputting it using MOM_output_literal will always show "#" and not the box: ▯   In my case, I needed this code as the end-of-code character for a post, so I created a proc with the code shown below:

 

  global  ptp_file_name

  # Close the ptp file and append the required control character to the
  # end of the file.
  MOM_close_output_file $::ptp_file_name

  set fid [open $::ptp_file_name a]
  puts $fid [format "%c" 0x25af]
  close $fid

  MOM_open_output_file $::ptp_file_name

I located this proc at the very end (i.e. bottom) of the End-of-Program block of the Program-End-Sequence.

 

Please note that the NX Information Window does not display this output correctly, so after posting, the control character will look wrong - something like this:

u25af Info Window.jpg

 

However, the output file saved on the OS does contain the correct code – do not use the output in the Information window to post to your machine.

 

Hopefully this will get you going.

 

Regards,

~Ulas

Re: Inserting a certain ASCII char to post output

Valued Contributor
Valued Contributor

Thanks,

Majid

Learn online





Solution Information