With Ugpost, i would like to know if there is a "simple" way to know from where UDEs have been applied. (operations / groups programs / methods / geometry ...)
The best would be to have a variable mom ...
The order of the events being sent to the post is fixed. The procs are called when the events are received.
From the docs:
When you post process a tool path, the data is output in the following order:
Start of program
User-defined events (UDEs) attached to the program
Start of parent group (program, machine tool, geometry, method)
UDEs attached to the parent group
UDEs attached to the geometry with program, machine tool, geometry, method commands
UDEs attached to the method with Start Events
UDEs attached to the cutting tool with Start Events
UDEs attached to the machine tool with Start Events
Start of operation
Tool change (not Load tool)
UDEs attached to the operation with Start Events
UDEs attached to the operation with End Events
End of operation
UDEs attached to the geometry with End Events
UDEs attached to the method with End Events
UDEs attached to the cutting tool with End Events
UDEs attached to the machine tool with End Events
End of program
"I can't know if information come from geometry or method or cutting tool or machine tool between "Start of parent group" and "Start of operation"."
Do you mean you can't see the UDE? Or there is info in your posted code, and you do not know where it came from?
Have you considered using the Start Event and End Event columns in the ONT to determine where the UDEs are coming from? You will have to display these columns in each of the views, but then you'd be able to very quickly see what's assigned and where it's assigned to:
If you rest your cursor over any of the Mill Control icons in the ONT, it will display what the UDE is.
If you want a more detailed record of the Start/End Events columns, use "Export to Spreadsheet" to get a spreadsheet of the current ONT view along with the contents of any assigned UDEs:
If no UDE is assigned, then the column (in the spreadsheet) simply says "Start Event" or "End Event" - otherwise you see the actual UDE settings.
Hope this helps.
It is not used as commonly, but a lot of people are unaware of how to add UDEs to Methods, Tools and Geometry. Right Click>Object>Start/End Events.
@FredJ You may now this already, but I added this info in case it may help someone who sees this post.
@Study Your right, you can even use Edit toolpath and place a Machine Control Event within a toolpath between any move you choose.
Still difficult to find.
Interestingly a UDE for tool is preceded by "$$UDE:"
An operator message and "Insert Instruction" inside an MCS does not have a "$$UDE:" before it in the listing.
TOOL PATH/313-MCS_OP110_SHIFT3_-N-_UP,TOOL,BORE-1.3765 TLDATA/DRILL,MILL,1.3765,0.0000,3.7000,180.0000,3.7000 MSYS/3.1912,-1.8173,-6.2964,0.0109938,-0.9999396,0.0000000,0.9999396,0.0109938,0.0000000 $$ centerline data PAINT/PATH PAINT/SPEED,10 LOAD/TOOL,202,ADJUST,202 PAINT/COLOR,186 RAPID GOTO/0.8290,-5.6000,5.6569,0.0109938,-0.9999396,0.0000000 CYCLE/BORE,DRAG,RAPTO,0.1000,FEDTO,-0.5640,RTRCTO,AUTO,IPM,3.0000 PAINT/COLOR,31 GOTO/0.7849,-1.5892,5.6569 CYCLE/OFF PAINT/COLOR,186 RAPID GOTO/0.8290,-5.6000,5.6569 PAINT/SPEED,10 PAINT/TOOL,NOMORE END-OF-PATH DISPLY/***** SHIFT OFF ***** INSERT/G52 X0. Y0. Z0. $$UDE: TOOL BREAK CHECK (ATTACH TO TOOL END EVENT)/TOOL BREAK CHECK=OFF <<<<<< UDE attached to tool CLAMP/OFF DISPLY/***** SHIFT ON ***** INSERT/EXTCALL"G52_SHIFT3" <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< UDE Insert instruction TOOL PATH/314-MCS_OP110_SHIFT3_-N-_UP,TOOL,BORE-1.3765 TLDATA/DRILL,MILL,1.3765,0.0000,3.7000,180.0000,3.7000 MSYS/3.1912,-1.8173,-6.2964,0.0109938,-0.9999396,0.0000000,0.9999396,0.0109938,0.0000000 $$ centerline data PAINT/PATH PAINT/SPEED,10 LOAD/TOOL,202,ADJUST,202 PAINT/COLOR,186 RAPID GOTO/0.8290,-5.6000,5.6569,0.0109938,-0.9999396,0.0000000 CYCLE/BORE,DRAG,RAPTO,0.1000,FEDTO,-0.5640,RTRCTO,AUTO,IPM,3.0000 PAINT/COLOR,31 GOTO/0.7849,-1.5892,5.6569
While it is done external to the post, you can use the journal in this thread to find *most* UDEs in a part:
There's a couple places you can hide UDEs that I have't gotten to yet (I think I documented them in the thread and/or code)
*In* the post, you would have to figure out if there is a variable you can use.
- Get the proc "MOOG_Show_Globals" from this thread:
- Add you your event handler code
- Add your UDE to various places (methods, geometry parents, tools, etc,)
- compare the output for each place, try to find variables that make sense to identify the UDE location
I'm guessing mom_event_name will be the UDE itself, but maybe not
Out of curiosity, WHY do you want to know where the UDE is placed?
Production: NX10.0.3.5 MP16/TC11.2
I'd rather be e-steamed than e-diseaseled