cancel
Showing results for 
Search instead for 
Did you mean: 

How to use UGII_UPDATE_FAIL_OPTION environment.

Experimenter
Experimenter

 

Set environment variable as below: (As per the Open C documentation)

UGII_UPDATE_FAIL_OPTION= UF_MODL_UPDATE_ACCEPT_ALL

OR

UGII_UPDATE_FAIL_OPTION=ACCEPT_ALL

OR 

UGII_UPDATE_FAIL_OPTION=5

 

Now launch NX and run VB code to get the value of UpdateFailOption using 'AskUpdateFailOption'.

========================================

Option Strict Off
Imports System
Imports System.IO


Imports NXOpen.UF
Imports NXOpen.UF.UF
Imports NXOpen.UF.UFModl

 

Module NXJournal

Sub Main (ByVal args() As String)

Dim theUfSession As UFSession = UFSession.GetUFSession()

Dim updateOpt As UpdateOption

theUfSession.Modl.AskUpdateFailOption(updateOpt)
msgbox (updateOpt)
End Sub

End Module

=====================================

 

 

theUfSession.Modl.AskUpdateFailOption(updateOpt) => gives the value as 0 instead  5.

 

Is the environment variable set to correct option?

 

Thanks.

3 REPLIES

Re: How to use UGII_UPDATE_FAIL_OPTION environment.

Phenom
Phenom

I don't think there is any need to set an environment variable for this...

 

 

Option Strict Off
Imports System
Imports System.IO


Imports NXOpen.UF
Imports NXOpen.UF.UF
Imports NXOpen.UF.UFModl

 

Module NXJournal

Sub Main (ByVal args() As String)

Dim theUfSession As UFSession = UFSession.GetUFSession()

Dim updateOpt As UpdateOption

theUfSession.Modl.AskUpdateFailOption(updateOpt)
msgbox (updateOpt.tostring)


theUfSession.Modl.SetUpdateFailOption(UFModl.UpdateOption.UpdateAcceptAll)
theUfSession.Modl.AskUpdateFailOption(updateOpt)
msgbox (updateOpt.tostring)


End Sub

End Module

Re: How to use UGII_UPDATE_FAIL_OPTION environment.

Experimenter
Experimenter

Thanks for the comments.

 

But the requirement is set these options using existing environment variable as mentioned in Open C API Doc  & not though the code level. But this environment variable seems not working for me. So just wanted to know whether values set are correct or something is missing.

 

UF_MODL FunctionsUF_MODL_set_update_fail_option (view source)
 

Defined in: uf_modl.h
 
Overview
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.

Re: How to use UGII_UPDATE_FAIL_OPTION environment.

Siemens Phenom Siemens Phenom
Siemens Phenom

 

If it is not working as documented, please report this issue to GTAC so that we can determine whether to refer it to development for resolution as a Problem Report.  We'll need to know what version you are using, and we'll want a syslog that shows that the variable was set, but the program ignored the setting.  Thanks!