Showing results for 
Search instead for 
Did you mean: 

Can lappend do enlappend use?

Solution Partner Pioneer Solution Partner Pioneer
Solution Partner Pioneer





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?





Re: Can lappend do enlappend use?

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

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 Akerboom Sr CAx Systems Engr, Moog, Inc.
Production: NX10.0.3.5 MP16/TC11.2
I'd rather be e-steamed 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