Showing results for 
Search instead for 
Do you mean 
Reply

Call UF function from other threads return an 928 error

As the project require, I create a new thread to process some function.in this thread, I call a UF function “UF_MODL_trim_body”.This function return an error 928.call “UF_get_fail_message” and get the error information” SM function called from the wrong thread”. Whether I can’t use UF function in different threads,and must call in domain thread?

 

3 REPLIES

Re: Call UF function from other threads return an 928 error

The NX API does not currently support multi-threading. See this thread:

https://community.plm.automation.siemens.com/t5/NX-Programming-Customization/Threading/m-p/296586#M1...

Re: Call UF function from other threads return an 928 error

Thank you cowski1!,It has done as you say.

Re: Call UF function from other threads return an 928 error

I've recently tried succesfully to use a separate thread to display temprary objects (points arcs etc) while my BlockDialog is executing. This was to give the user some graphical help using the BlockDialog.

Temporary objects get removed if the user does a fit or refresh, so I wanted them to remain visible for the duration of my BlockDialog, using another thread that simply repaints the temporary objects every half-second works great.

Creating the temporary objects is obviously done with NXOpen (although only to wrappers of UF calls), but it is not modifying the model so I presume this is why the two threads live happily together.

Graham Inchley Snr R&D Engineer (Systems Development), Sandvik Coromant
Lenovo ThinkPad W540, Win7, 16GB. Developing in: Java | C | C# | KF
Production: NX8.5.3.3 MP11 64bit Testing: NX9.0.2.5