cancel
Showing results for 
Search instead for 
Did you mean: 

Postbuilder PB_CMD_creat_tool_list Formatting Output

Creator
Creator

Does anyone know where the output of PB_CMD_creat_tool_list is formatted? The documentation says it's uses pb_post_tool_list.tpl as it's template file. I can't make sense of it. I want to change the format to tool_number tool_name tool_diameter tool_length.

 

The Proc is working, I just don't like the format.

 

Thanks

9 REPLIES

Re: Postbuilder PB_CMD_creat_tool_list Formatting Output

Esteemed Contributor
Esteemed Contributor

 Looking in NX9:

%UGII_BASE_DIR%\POSTBUILD\pblib\custom_command\pb_cmd_tool_list.tcl

 

I see rather extensive documentation talking about the .tpl & where it is (and where it needs to be moved to) and how to use these procs

Later on (search on "pb_lib_misc_dir") I see a list of folders where it looks for the .tpl

 

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: Postbuilder PB_CMD_creat_tool_list Formatting Output

Phenom
Phenom

At a glance (and I might be wrong) it seems that the tool list format (when this routine left otb) is hard coded (you would have to change these lines in MOM_SETUP_HDR)

 

set output [format "%-20s %-20s %-10s %-10s %-10s %-9s %-10s" \
$tool_name $tool_desc \
$tool_dia $tip_ang $flute_len $adjust $mach_time]

NX10.03
Windows 7 Pro

Re: Postbuilder PB_CMD_creat_tool_list Formatting Output

Creator
Creator

 I was looking in Shop Docs for a file that formatted the output. I see in PB_CMD_init_tool_list the MOM_SETUP_HDR to format the header. Not seeing where the tool parameters are output so I can add $mom_tool_number unless it's above the MOM_SETUP_HDR in the switch $tool_type.

 

Thanks for the direction.

Re: Postbuilder PB_CMD_creat_tool_list Formatting Output

Phenom
Phenom

Yes - I think where tool_data_buffer array is being built in MOM_SETUP_HDR inside PB_CMD_init_tool_list - the order and content of the tool data lines are set.

NX10.03
Windows 7 Pro

Re: Postbuilder PB_CMD_creat_tool_list Formatting Output

Creator
Creator

Thanks for the direction. I have it from here.

 

Thanks

Re: Postbuilder PB_CMD_creat_tool_list Formatting Output

Siemens Genius Siemens Genius
Siemens Genius

In PB_CMD_create_tool_list custom command, you can also choose a desired type of tool listing by setting the variable "mom_sys_tool_list_output_type":

 

#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Set mom_sys_tool_list_output_type to the desired output fashion.
#
# "ORDER_IN_USE" - List tools used in the program in the order of operations.
# "ALL_UNIQUE" - List all unique tools once for each in the order of use.
# "GROUP_BY_TYPE" - List tools in groups of different tool types.
#
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# set mom_sys_tool_list_output_type "ORDER_IN_USE"
# set mom_sys_tool_list_output_type "ALL_UNIQUE"
set mom_sys_tool_list_output_type "GROUP_BY_TYPE"

Re: Postbuilder PB_CMD_creat_tool_list Formatting Output

Creator
Creator

Any clue as to why a spherical end mill won't print out in the tool list. I believe it's classified as Milling. It just writes a blank line.

 

Thanks

Re: Postbuilder PB_CMD_creat_tool_list Formatting Output

Siemens Genius Siemens Genius
Siemens Genius

dspitz -

 

It's probably caused by the function MAP_TOOL_TYPE (uplevel'ed in PB_CMD_init_tool_list) below:

 

proc MAP_TOOL_TYPE { } {
global mom_tool_type

if {[string match "Milling*" $mom_tool_type]} {
return "MILL"
} elseif { [string match "Turning*" $mom_tool_type]} {
return "LATHE"
} elseif { [string match "Grooving*" $mom_tool_type]} {
return "LATHE"
} elseif { [string match "Threading*" $mom_tool_type]} {
return "LATHE"
} elseif { [string match "Drilling*" $mom_tool_type]} {
return "DRILL"
} elseif { [string match "Tap*" $mom_tool_type]} {
return "DRILL"
} else {
return ""
}
}

 

The last "else" case probably should have returned "MILL" instead just to take care of majority of the situations. Or you can add more specific cases to handle specific tool types.

 

 

Re: Postbuilder PB_CMD_creat_tool_list Formatting Output

Creator
Creator

I was looking at the tool types in the tool database and thought Spherical was typed Milling. Not so. Thanks for the direction, it did the trick.

 

 

Learn online





Solution Information