Showing results for 
Search instead for 
Do you mean 
Reply

Can lappend do enlappend use?

 

 

 

 

Dear All

When i lappend this event ,I can do good for this post.

But I can't sure which one event resulting in problem.

So, Can we reverse definition this event?

 

 

2016-08-22_14-52-57.jpg

3 REPLIES

Re: Can lappend do enlappend use?

Are you asking that (after adding a variable name to the list) you want to remove it from the list?

If so you will probably need

- lsearch (to get index of element to remove)

- lreplace (to remove that element)

 

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: Can lappend do enlappend use?

Just an observation, but you're using lappend to append the same variable every time. You could just set the variable to a list:

   

set my_variable {value1 value2 value3 value4}

 

Also if you want to see which one is causing an errror you can look at the log file after the post errors out, or use the built in Tcl command "catch"

 

if {[catch {some_tcl_command my_arg}]} {MOM_output_to_listing_device "Command blah blah blah didn't work}

Re: Can lappend do enlappend use?

This is regarding the fix I offered for PB_CMD_create_tool_list changing the fixture offset on the first operation.

 

This is an OOTB set of procs.

 

From the notes in the proc

 

#=============================================================
proc PB_CMD_save_active_oper_tool_data { } {
#=============================================================
#  This command saves the attributes of the tool used in the current operation
#  to be post-processed before the generation of the tool list.
#
#  This command will be executed automatically in PB_CMD_create_tool_list.
#
#  You may add any desired MOM variable to the list below to be restored
#  later in your post.
#

To temporarily remove the edit comment the line shown.

 

   set mom_sys_oper_tool_attr_list [list]

    lappend mom_sys_oper_tool_attr_list  mom_tool_number
    lappend mom_sys_oper_tool_attr_list  mom_tool_length_adjust_register
    lappend mom_sys_oper_tool_attr_list  mom_tool_name
    lappend mom_sys_oper_tool_attr_list  mom_operation_name
    lappend mom_sys_oper_tool_attr_list  mom_spindle_direction_control
    # lappend mom_sys_oper_tool_attr_list  mom_fixture_offset_value

I think a Postbuilder course and some study of TCL would help

 

 

Learn online





Solution Information