Shop Doc help
Shop Doc help
(OP)
I'm looking to add two columns to my tool list html file, "tool holder description" and "tool extension". The first went fine but I'm having trouble with the second. I imagine it is because "extension" is a variable I created within a custom command "PB_CMD_tool_extension" for my post. I tried setting the variable "set extension [expr $mom_tool_length - $mom_tool_holder_offset]", but I'm getting an error indicating the tool length variable isn't available. I'm not sure how to set this variable since I didn't have to do this in postbuilder. Not even sure if this doable. I've attached the tcl as well as the custom command.
TIA
TIA
Ray S
NX 7.0.1.7
www.appliedprecisionproducts.com





RE: Shop Doc help
RE: Shop Doc help
# of the event handler."
At any rate, I'm not sure what to move where. I apologize for my tcl lameness. My programming skills pretty much end with machine tools.
Ray S
NX 7.0.1.7
www.appliedprecisionproducts.com
RE: Shop Doc help
set mom_source_directory [MOM_ask_env_var UGII_CAM_SHOP_DOC_DIR]
source "$mom_source_directory/shopdoc_header.tcl"
set table_flag 0
set setup_header 0
set Tool_No(mill) 0
set Tool_No(drill) 0
set Tool_No(lathe) 0
global extension
set extension [expr $mom_tool_length - $mom_tool_holder_offset]
RE: Shop Doc help
set mom_source_directory [MOM_ask_env_var UGII_CAM_SHOP_DOC_DIR]
source "$mom_source_directory/shopdoc_header.tcl"
set table_flag 0
set setup_header 0
set Tool_No(mill) 0
set Tool_No(drill) 0
set Tool_No(lathe) 0
global mom_tool_length
global mom_tool_holder_offset
global extension
set extension [expr $mom_tool_length - $mom_tool_holder_offset]
Ray S
NX 7.0.1.7
www.appliedprecisionproducts.com
RE: Shop Doc help
RE: Shop Doc help
Thanks for the help.
Ray S
NX 7.0.1.7
www.appliedprecisionproducts.com
RE: Shop Doc help
RE: Shop Doc help
Anyway, I'll paste below what worked for me. I'm kind of surprised the shop docs don't have this info OTB. I don't know how set up guys can chuck up tools without it.
global mom_tool_length
global mom_tool_holder_offset
global extension
set extension [expr $mom_tool_length - $mom_tool_holder_offset]
MapToolType tool_type
if {$setup_header > 1} \
{
if { [string compare $tool_head $tool_type] } { return }
if { $mom_template_subtype == "" } { set mom_template_subtype $mom_tool_type }
switch $tool_head \
{
"DRILL" {
set pi [expr 2 * asin(1.0)]
set mom_tool_point_angle [expr [expr 180 / $pi] * \
$mom_tool_point_angle]
MOM_output_literal "<tr>"
MOM_output_literal "<td ALIGN=CENTER>$mom_tool_name</td>"
MOM_output_literal "<td ALIGN=CENTER>$mom_tool_description</td>"
MOM_output_literal "<td ALIGN=CENTER>[format "%10.4f" \
$mom_tool_diameter]</td>"
MOM_output_literal "<td ALIGN=CENTER>[format "%10.4f" \
$mom_tool_point_angle]</td>"
MOM_output_literal "<td ALIGN=CENTER>[format "%10.4f" \
$mom_tool_flute_length]</td>"
MOM_output_literal "<td ALIGN=CENTER>$mom_holder_description</td>"
MOM_output_literal "<td ALIGN=CENTER>[format "%10.3f" \
$extension]</td>"
MOM_output_literal "<td ALIGN=CENTER>[format "%10d" \
$mom_tool_length_adjust_register]</td>"
MOM_output_literal "</tr>"
Ray S
NX 7.0.1.7
www.appliedprecisionproducts.com