Cancel
Showing results for 
Search instead for 
Did you mean: 

Another tool message problem,How to setting that?

Solution Partner Pioneer Solution Partner Pioneer
Solution Partner Pioneer

2016-10-12_16-08-36.jpg2016-10-12_15-53-37.jpg

I have put files in the forum, you can download it!

3 REPLIES

Re: Another tool message problem,How to setting that?

Legend
Legend

Hi,

1) I wrote the solution to you here: https://community.plm.automation.siemens.com/t5/Discussion-Forum-NX/How-can-i-do-tool-code-replace-t...

If you need also output the tool names, add one more list ToolNames to my procedures:

global ToolNumbers ToolNames
set ToolNumbers [list]
set ToolNames [list]
global mom_tool_number mom_tool_name
global ToolNumbers ToolNames

set l [llength $ToolNumbers]
for { set i 0 } { $i < $l } { incr i } {
set num [lindex $ToolNumbers $i]
if { $mom_tool_number == $num } { break }
}

if { $i >= $l } { lappend ToolNumbers $mom_tool_number
lappend ToolNames $mom_tool_name
}
MOM_output_literal [format "TOOL CALL Q%d ..." [expr 601+$i]]
global ToolNumbers ToolNames

set l [llength $ToolNumbers]
for { set i 0 } { $i < $l } { incr i } {
set num [lindex $ToolNumbers $i]
set name [lindex $ToolNames $i]
MOM_output_literal [format "Q%d=%d; TOOL CALL:%d; %s" [expr 601+$i] $num $num $name]
}

 

2) If you can insert Q-lines after the line ";(DATE...", you should add this marker into condition if in the procedure PB_cmd_reprocess (see https://community.plm.automation.siemens.com/t5/Discussion-Forum-NX/PostProcessor-The-minimum-and-ma...):

while { [gets $handle_r buf] > 0 } {
puts $handle_w $buf

if { [string match "*;(DATE*" $buf] } {
##### Output here your Q601 etc.
}
}

 

Re: Another tool message problem,How to setting that?

Solution Partner Pioneer Solution Partner Pioneer
Solution Partner Pioneer

Hello Frobi

 

 This question "2"

Can you give me a simple example post files at attachment?

Maybe I can understand the problem more quickly

 

Thank you very much !

Re: Another tool message problem,How to setting that?

Legend
Legend

Hi,

I did it. See attachment.

Your 3 procedures - PB_CMD_TOOL_CHANGE, PB_CMD_TOOL_NUMBER, PB_CMD_TOOL_REP - are edited.

Learn online





Solution Information