Cancel
Showing results for 
Search instead for 
Did you mean: 

How to override MOM_start_of_group

Genius
Genius

Capture.JPG

 

I can use this function to override MOM_end_of_group but not  MOM_start_of_group.

I found the MOM_start_of_group in both post and ugpost_base.tcl.

I found the MOM_end_of_group in only ugpost_base.tcl.

 

Thanks

7 REPLIES 7

Re: How to override MOM_start_of_group

Genius
Genius
It works by adding uplevel #0

proc MOM_start_of_group {} {
uplevel #0 {

}
}

Re: How to override MOM_start_of_group

Gears Phenom Gears Phenom
Gears Phenom

I am just curious, why you want to do that ?

---------------------------------------------
#♫ PB, 5ax, itnc, nx, vericut ♫ #

Re: How to override MOM_start_of_group

Genius
Genius

I want to modify MOM_start_of_group.

 

 

Re: How to override MOM_start_of_group

Gears Phenom Gears Phenom
Gears Phenom

I see, but I am asking why. Is it something wrong about it ?

---------------------------------------------
#♫ PB, 5ax, itnc, nx, vericut ♫ #

Re: How to override MOM_start_of_group

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

If you "source" in a user tcl file, in that "user" file I have just:

proc MOM_start_of_group {} {
    # do whatever here
}

and it works fine.

Note I do NOT have "Output settings" -> "Other options" -> "Generate group output" checked - that may change behavior.

Also note I'm on NX10/PB10 - I don't know if they changed anything in newer versions of PB.

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: How to override MOM_start_of_group

Genius
Genius

 

Hello Ken

 

I am using NX11, PB 11.

If you have "Output settings" -> "Other options" -> "Generate group output" checked.

You need to add uplevel #0.

proc MOM_start_of_group {} {
  uplevel #0 {
  # do whatever here
}
}

 

Thanks

Re: How to override MOM_start_of_group

Phenom
Phenom
The latest proc wins (always.) you can redefine a proc any time you want (usually - it seemed that a couple don't "take" after initial read through at one past experience - MOM_before_output or MOM__halt or something.) I often declare procs in start of program (by uplevel #0 to level zero) but there are some procs in postbuilder source that are redeclared out of other procs - MOM_rotate was one that comes to mind.
NX12.02
Windows 10 Pro

Learn online





Solution Information