Showing results for 
Search instead for 
Do you mean 
Solved! Go to solution

Edit UDF prompt using .NET C# API



I'd like to edit a prompt value of a UDF in NX7.5 using the .NET C# API.

In UFUNC projects, I managed this by using the method UF_MODL_edit_instantiated_udf.

Unfortunately there is no pendant of it availble in the NXopen.UF.UFModl.


Did anyone ran into the same problem already or knows how to update prompts of an UDF using NXOpen.NET?


Thanks in advance!




Re: Edit UDF prompt using .NET C# API

There is 'UserDefinedFeatureEditEvent' class released in NX8.  May be that will help.

Re: Edit UDF prompt using .NET C# API

Unfortunately I'm bound to NX7.5.

In addition, I checked the mentioned class and its used to define/attach an UDF edit event.

I'm looking for something to directly edit the UDF's prompt values.
I tried by retrieving and modifying the UDF expressions, but they are locked byt the UDF feature.


I think I will have to create my own wrapper for UF_MODL_edit_instantiated_udf.



Thanks for your help!

Accepted by topic author Spiller
‎11-18-2016 10:26 AM

Re: Edit UDF prompt using .NET C# API

I contacted GTAC about this.

This is their answer, for your reference:

Unfortunately there is no solution to edit an UDF in .NET. There are a number of Open C functions that have no wrapper functions in .NET. The reason is that the functions use a data type called union, and apparently there is no equivalent type in .NET. I'm sorry to say that UF_MODL_edit_instantiated_udf() is one of those functions. So the only option is to use C/C++ to do this.