Showing results for 
Search instead for 
Do you mean 

User Exit for postprocessing not working

Hello All,

I'm trying to adapt a User Exit sample from GTAC which I want to be called when the postprocessing menu item is selected within CAM but nothing seem to be happening. From the documentation the entry point is ufpost and the environmental variable is USER_POST which has a value of C:\temp\xxx.dll.


Any Idea?



Imports System

Imports System.Windows.Forms

Imports NXOpen

Imports NXOpen.UF

Imports NXOpen.Utilities


Module UserExit


   Function ufpost() As Integer


       Dim a As Session = Session.GetSession()

       MessageBox.Show("Saving: " & a.Parts.Work.FullPath)


       ufpost = 1 ' set to 1 to stop the save


   End Function


   Public Function GetUnloadOption(ByVal dummy As String) As Integer


       Return CType(Session.LibraryUnloadOption.Immediately, Integer)


   End Function


End Module


Best Regards




Re: User Exit for postprocessing not working

Here is what documentation says about that User Exit:


The CLSF postprocess exit occurs after Application→Manufacturing→Toolbox→ Tool Path...→Postprocess→Postprocess. Selecting this option executes both the USER_CL_GEN (CLF generation) and USER_POST (CLSF postprocessing) exits in succession.


It looks to me you would also require this user exit to be defined in your DLL:


Function ufclg(ByVal args As String()) As Integer


Since you only have ufpost defined, I guess NX just fails gracefully when trying to execute the User Exit.



Re: User Exit for postprocessing not working

Thanks i'll get it a try and let you know how i get on

Re: User Exit for postprocessing not working

Thanks for your suggestion, I gave it ago unfortunately still no joy. I’ll contact GTAC and seer if they can assist

Re: User Exit for postprocessing not working

I am not familiar with CAM.  Can you attach a simple model where I can hit Post Process without having to correctly define all the prerequisites?

Re: User Exit for postprocessing not working


Thanks for your efforts with this. Find attached part, if your select the program group named "Program" RMB->Postprocess this should call the entry point to the userexit



Re: User Exit for postprocessing not working

I was not able to make the User Exit work either.  But I managed to call a dll after Post Processing has been hit by modifying the menu of CAM.  See zip file attached. 


The idea is to modify the Post Processing button and to add a POST action which is your NXOpen dll.  In order to do so, you will need an NXOpen application directory structure (both application and startup directories) and point to it using UGII_USER_DIR or by modifying the UGII\menus\custom_dirs.dat file.

Re: User Exit for postprocessing not working

You quote the documentation as saying this user exit is for CLSF postprocessing, but your istructions say to use NX Post. I suspect this is a legacy function for the old GPM post, but you should check with GTAC.


Mark Rief
Retired Siemens