Cancel
Showing results for 
Search instead for 
Did you mean: 

Edit UDF prompt using .NET C# API

Valued Contributor
Valued Contributor

Hi,

 

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!

 

 

3 REPLIES

Re: Edit UDF prompt using .NET C# API

Legend
Legend

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

Re: Edit UDF prompt using .NET C# API

Valued Contributor
Valued Contributor

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!

Re: Edit UDF prompt using .NET C# API

Valued Contributor
Valued Contributor

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.