Cancel
Showing results for 
Search instead for 
Did you mean: 

Disable self-intersecting face error

Pioneer
Pioneer

Hi,

is it possible to disable the "self-intersecting face error "message of a boolean operation?

Really I need to disable it inside a dll written in visual basic with visual studio.

 

Thank you

 

Luigi

 

6 REPLIES

Re: Disable self-intersecting face error

Phenom
Phenom

as @JimB says in this post Disable feature error messages

 

quote "Any message box like this that is displayed when running an NX Open application is a bug."

 

Report to GTAC.

 

Possible work arounds

Run as extrenal if possible.

Set Update options to UF_MODL_UPDATE_ACCEPT_ALL

Re: Disable self-intersecting face error

Pioneer
Pioneer

Could you give me an example visual basic code to "Set Update options to UF_MODL_UPDATE_ACCEPT_ALL"

 

Thanks 

 

Luigi

Re: Disable self-intersecting face error

Phenom
Phenom

I use Open C,not sure with other language's

 

 

UF_MODL_set_update_fail_option(UF_MODL_UPDATE_ACCEPT_ALL);

And reset later

 

UF_MODL_set_update_fail_option(UF_MODL_UPDATE_NO_OPTION);

 

from the header files

 

/******************************************************************************
Sets the current fail option in case an update failure occurs. This
allows the user to specify the update behavior in advance, should an
error occur in the middle of a modeling update. It would be as if a
user in interactive NX had selected the UNDO, SUPPRESS,
SUPPRESS ALL, ACCEPT_ALL or INTERRUPT button in the Edit 
During Update dialog.

The user can also set a variable of UGII_UPDATE_FAIL_OPTION before running 
an NX Open API and set it to any of the values defined in UF_MODL_update_option_e.

Environment: Internal  and  External
See Also: 
History:Original release was in V14.0.
 ******************************************************************************/
extern UFUNEXPORT int UF_MODL_set_update_fail_option(
UF_MODL_update_option_t new_fail_option  /* <I>
                                         Sets the update fail option to the
                                         given value.
                                         */
);

/*
The following are valid parameters to UF_MODL_set_update_fail_option ().
*/

enum UF_MODL_update_option_e
{
UF_MODL_UPDATE_NO_OPTION = 0, /*No option defined yet */
UF_MODL_UPDATE_UNDO, /*Undo entire Update operation. */
UF_MODL_UPDATE_SUPPRESS, /*Suppress previous failed object */
UF_MODL_UPDATE_SUPPRESS_ALL, /*Suppress previous failed object and rest of list */
UF_MODL_UPDATE_ACCEPT, /*Accept warning of previous object */
UF_MODL_UPDATE_ACCEPT_ALL, /*Accept previous warning and future of same type */
UF_MODL_UPDATE_INTERRUPT /*Interrupt update */
};
typedef enum UF_MODL_update_option_e UF_MODL_update_option_t;

 

Re: Disable self-intersecting face error

Phenom
Phenom

In the .NET docs look for SetDefaultUpdateFailureAction

 

Re: Disable self-intersecting face error

Pioneer
Pioneer

I found the example I asked for:

 

Dim ufSess As UFSession = UFSession.GetUFSession()
ufSess.Modl.SetUpdateFailOption(UFModl.UpdateOption.UpdateAcceptAll)

 

This solution seems to work partially because the error number I recive seems to be less than before but it doesn't solve completly.

 

Does someone get another idea?

Re: Disable self-intersecting face error

Phenom
Phenom

Without an idea of what you are trying to do its a little hard.

 

Another option is to set  UF_MODL_UPDATE_UNDO

Then use UF_MODL_ask_update_undo_feat() and UF_get_fail_message() if UF_MODL_update() returns an error.