Showing results for 
Search instead for 
Do you mean 
Reply

Update Undo Happened when attempting to OpenComponents and ReplaceReferenceSetInOwners

I'm recieving "Update Undo Happened" errors occasionally when using the code below. I'm trying to find a reproducable way to make it happen but I'm having issues replicating it reliabiliy even on the same assembly file. I'm going to keep searching for a reproducable assembly, but until I find one, does anyone have any insight on why this might happen?

 

Nx 9, vb.net, no undo marks in my code.

 

Snippet from my open components code:

        Dim openStatus() As Assemblies.ComponentAssembly.OpenComponentStatus = Nothing
        Dim partLoadStatus1 As PartLoadStatus = Nothing
        partLoadStatus1 = dspPrt.ComponentAssembly.OpenComponents(ComponentAssembly.OpenOption.ComponentOnly, lstCompsToOpen.ToArray, openStatus)

Change reference sets code:

Sub ChangeReferenceSets()
        Dim lstCompsChangeRefSet As New List(Of Component)

        For Each comp In lstComps 'lstComps is a global variable with most of the components from the assembly
            If Not comp.ReferenceSet.Equals(comp.EntirePartRefsetName) Then lstCompsChangeRefSet.Add(comp)
        Next
        Dim errLst As ErrorList = dspPrt.ComponentAssembly.ReplaceReferenceSetInOwners("Entire Part", lstCompsChangeRefSet.ToArray)

        For i As Integer = 0 To errLst.Length - 1
            nxLw.WriteLine("Error number: " & i.ToString)
            nxLw.WriteLine("  " & errLst.GetErrorInfo(i).ErrorCode & ": " & errLst.GetErrorInfo(i).Description)
            nxLw.WriteLine("")
        Next
    End Sub
DHuskic Nx 9
7 REPLIES

Re: Update Undo Happened when attempting to OpenComponents and ReplaceReferenceSetInOwners

[ Edited ]

On which line of code is the error thrown? The error message should indicate which line was executing at the time of the error.

 

Edit: Also, check the NX log file after the error occurs, it may give additional indications as to what happened and why.

Re: Update Undo Happened when attempting to OpenComponents and ReplaceReferenceSetInOwners

When the error occurs, it is on these commands:

 

partLoadStatus1 = dspPrt.ComponentAssembly.OpenComponents(ComponentAssembly.OpenOption.ComponentOnly, lstCompsToOpen.ToArray, openStatus)

Dim errLst As ErrorList = dspPrt.ComponentAssembly.ReplaceReferenceSetInOwners("Entire Part", lstCompsChangeRefSet.ToArray)

I will get the relevant log file output to see if there is anything there.

DHuskic Nx 9

Re: Update Undo Happened when attempting to OpenComponents and ReplaceReferenceSetInOwners

[ Edited ]

Hmm. I think there's bad features trying to update within my assembly file when I'm opening componenets and changing reference sets. I ran the same code 4 times on the same assembly file(open file, run code, close file), and it gave me this error the 4th time.

 

Error occured on opencomponents:

Message : Update undo happened.
   at NXOpen.Assemblies.ComponentAssembly.OpenComponents(OpenOption openOption, Component[] componentsToOpen, OpenComponentStatus[]& openStatus)

 

  Read in all for part "U:\Assembly\Month.prt", cpu    0.078, real    0.092
Partition info: CM:1 (0.0, 0.0) PST:10 (0.0, 0.0) KF:1 (0.0, 0.0) 
Loaded and updated part "U:\Assembly\Month.prt" cpu    0.078, real    0.096
Teamcenter Integration: capability PDM_Feature_Support is disabled
Teamcenter Integration: capability PLM2007_Feature_Support is disabled
Teamcenter Integration: capability PDM_Feature_Checksums_Support is disabled
1552249 is a dead parasolid tag
*** EXCEPTION: Error code  670028 in line 1534 of D:\workdir\Patches\nx903_patch\src\cmod\no\ind\cm_create_frec_mbf.c at Tue Sep 20 14:03:33 2016 Eastern Daylight Time
+++ apply feature for &000007FFD76881B0 failed
[ 1] 07FEFD85940D                                                              (KERNELBASE)
[ 2] 07FEDFE6A54E                                                              (libsyss)
[ 3] 07FEDFE9CF2D                                                              (libsyss)
[ 4] 07FEDFE9CC2B                                                              (libsyss)
[ 5] 07FEDFE9DC91                                                              (libsyss)
[ 6] 07FEDFE9DF62                                                              (libsyss)
[ 7] 07FEDFE6864B                                                              (libsyss)
[ 8] 07FEDFE66D42                                                              (libsyss)
[ 9] 07FEEEBF3C93                                                              (libcmod)
[10] 07FEEEBF2445                                                              (libcmod)
[11] 07FEEEE5EDFD                                                              (libcmod)
[12] 07FEEEE61A35                                                              (libcmod)
[13] 07FEEEE613D8                                                              (libcmod)
[14] 07FEEED3DB16                                                              (libcmod)
[15] 07FEEED3F9AC                                                              (libcmod)
[16] 07FEEED35130                                                              (libcmod)
[17] 07FEEEC33490                                                              (libcmod)
[18] 07FEEED8445C                                                              (libcmod)
[19] 07FEEEC32F5C                                                              (libcmod)
[20] 07FEDAC00883                                                              (libpart)
[21] 07FEDAC04CE4                                                              (libpart)
[22] 07FEDAC073ED                                                              (libpart)
[23] 07FEDDA034EF                                                              (libassy)
[24] 07FEDDC03D35                                                              (libassy)
[25] 07FEDDC059ED                                                              (libassy)
[26] 07FE8EE7D595                                                              ()
>>>> Error code  670028 caught in file "D:\workdir\Patches\nx903_patch\src\cmod\no\ind\cm_create_frec_mbf.c" at line number 2187
>>>> Error code  670028 caught in file "D:\workdir\Reference\NX903_4\src\cmod\no\ind\update_cm.c" at line number 2731
>>>> Error code  670028 successfully handled and acknowledged
*** EXCEPTION: Error code  670028 in line 5256 of D:\workdir\Patches\nx903_patch\src\cmod\no\ind\feature_record_definitions.c at Tue Sep 20 14:03:34 2016 Eastern Daylight Time
+++ Feature Update Failed - Trim Body(279) The tool and target do not form a complete intersection.

[ 1] 07FEFD85940D                                                              (KERNELBASE)
[ 2] 07FEDFE6A54E                                                              (libsyss)
[ 3] 07FEDFE9CF2D                                                              (libsyss)
[ 4] 07FEDFE9CC2B                                                              (libsyss)
[ 5] 07FEDFE9DC91                                                              (libsyss)
[ 6] 07FEDFE9DF62                                                              (libsyss)
[ 7] 07FEDFE6864B                                                              (libsyss)
[ 8] 07FEDFE66D42                                                              (libsyss)
[ 9] 07FEEEC33927                                                              (libcmod)
[10] 07FEEED8445C                                                              (libcmod)
[11] 07FEEEC32F5C                                                              (libcmod)
[12] 07FEDAC00883                                                              (libpart)
[13] 07FEDAC04CE4                                                              (libpart)
[14] 07FEDAC073ED                                                              (libpart)
[15] 07FEDDA034EF                                                              (libassy)
[16] 07FEDDC03D35                                                              (libassy)
[17] 07FEDDC059ED                                                              (libassy)
[18] 07FE8EE7D595                                                              ()
>>>> Error code  670028 caught in file "D:\workdir\Patches\nx903_patch\src\cmod\no\ind\feature_record_definitions.c" at line number 5331
>>>> Error code  670028 caught in file "D:\workdir\reference\NX903_4\src\part\no\ind\update.c" at line number 5596
>>>> Error code  670028 successfully handled and acknowledged
Update Option: Undo
*** EXCEPTION: Error code  670024 in line 648 of D:\workdir\Patches\nx903_patch\src\cmod\no\ind\cm_update_failure.c at Tue Sep 20 14:03:34 2016 Eastern Daylight Time
+++ Error 670028 for feature Trim Body(279), text is: The tool and target do not form a complete intersection.
[ 1] 07FEFD85940D                                                              (KERNELBASE)
[ 2] 07FEDFE6A54E                                                              (libsyss)
[ 3] 07FEDFE9CF2D                                                              (libsyss)
[ 4] 07FEDFE9CC2B                                                              (libsyss)
[ 5] 07FEDFE9DC91                                                              (libsyss)
[ 6] 07FEDFE9DF62                                                              (libsyss)
[ 7] 07FEDFE6864B                                                              (libsyss)
[ 8] 07FEDFE66D42                                                              (libsyss)
[ 9] 07FEEEC0B465                                                              (libcmod)
[10] 07FEEEC09726                                                              (libcmod)
[11] 07FEEEC2BE12                                                              (libcmod)
[12] 07FEDABFA4EC                                                              (libpart)
[13] 07FEDAC00DBE                                                              (libpart)
[14] 07FEDAC04CE4                                                              (libpart)
[15] 07FEDAC073ED                                                              (libpart)
[16] 07FEDDA034EF                                                              (libassy)
[17] 07FEDDC03D35                                                              (libassy)
[18] 07FEDDC059ED                                                              (libassy)
[19] 07FE8EE7D595                                                              ()
>>>> Error code  670024 caught in file "D:\workdir\reference\NX903_4\src\part\no\ind\update.c" at line number 9539
>>>> Error code  670024 caught in file "D:\workdir\reference\NX903_4\src\part\no\ind\update.c" at line number 9660
>>>> Error code  670024 caught in file "D:\workdir\reference\NX903_4\src\part\no\ind\update.c" at line number 8679
>>>> Error code  670024 caught in file "D:\workdir\reference\NX903_4\src\part\no\ind\update.c" at line number 8777
>>>> Error code  670024 caught in file "D:\workdir\Patches\nx903_patch\src\assy\no\ind\jax_component_assembly.c" at line number 3301
>>>> Error code  670024 caught in file "D:\workdir\Patches\nx903_patch\src\assy\no\ind\jax_component_assembly.c" at line number 3325
>>>> Error code  670024 caught in file "D:\workdir\Reference\NX903_4\drv\assy\no\ind\ja_assemblies_component_assembly_jam.cxx" at line number 3114
>>>> Error code  670024 successfully handled and acknowledged
Unloading \\test.dll
&MACRO MENU, 0, UG_HELP_SYSTEM_LOG UG_GATEWAY_MAIN_MENUBAR <RibbonFileBar->BackStageBar->LeftBackStageGroup->rbn_file_tab_help_cascade.csb> ## ! 
Successfully loaded dynamic module C:\Program Files\Siemens\NX 9.0\UGII\libhelpint.dll
Loaded module c:\program files\siemens\nx 9.0\ugii\libflat.dll 7febf660000 76000 c185c5c2-41f3849a-12b3f9a7-28c4f099-1=libflat___146052952864 version = 9.0.3.4
Loaded module c:\program files\siemens\nx 9.0\ugii\libsmdint.dll 7febcca0000 1f4000 8f976653-4b0f7839-f71f109a-67ab699d-1=libsmdint___146052797964 version = 9.0.3.4
Loaded module c:\program files\siemens\nx 9.0\ugii\libhelpint.dll 7febcea0000 143000 e68104cb-4e3ee1ef-c11c5c94-1f88085a-1=libhelpint___146052993664 version = 9.0.3.4
Loaded module c:\windows\microsoft.net\framework64\v4.0.30319\diasymreader.dll 7febcff0000 117000 29a5f6-41525354-c7351c96-e6907bf3-3 version = 14.0.81.0

 

 

 

DHuskic Nx 9

Re: Update Undo Happened when attempting to OpenComponents and ReplaceReferenceSetInOwners

I haven't been able to narrow down any reliable CAD parts for testing on this. I normally just run the same job 3-5 times from the same original file and it errors out on my randomly.

 

Here's my open component code in case anyone can figure out what might be wrong:

 

 Public Sub LoadComponents(ByVal componentsToProcess As Component(), Optional ByVal UsePartialLoading As Boolean = False)
        nxSes.Parts.LoadOptions.UsePartialLoading = UsePartialLoading

        Dim errLst As List(Of Integer) = New List(Of Integer)
        If componentsToProcess Is Nothing Or componentsToProcess.Length = 0 Then Return 'array is empty

        Dim lstCompsToOpen As New List(Of Component)
        For Each comp In componentsToProcess
            If IsNothing(comp.Prototype.OwningPart) Then
                lstCompsToOpen.Add(comp)
            ElseIf Not UsePartialLoading AndAlso Not comp.Prototype.OwningPart.IsFullyLoaded Then
                lstCompsToOpen.Add(comp)
            End If
        Next

        If lstCompsToOpen Is Nothing Or lstCompsToOpen.Count = 0 Then Return

        Dim openStatus() As Assemblies.ComponentAssembly.OpenComponentStatus = Nothing
        Dim partLoadStatus1 As PartLoadStatus = Nothing
        Try
            partLoadStatus1 = dspPrt.ComponentAssembly.OpenComponents(ComponentAssembly.OpenOption.ComponentOnly, lstCompsToOpen.ToArray, openStatus)
        Catch nex As NXException
            If nex.ErrorCode.Equals(670024) Then
                Try
                    For count As Integer = 0 To lstCompsToOpen.ToArray.Length - 1
                        Dim currentPart As Part = lstCompsToOpen.ToArray(count).Prototype.OwningPart
                        Dim partName As String = ""
                        Dim refsetName As String = ""
                        Dim instanceName As String = ""
                        Dim origin(2) As Double
                        Dim csysMatrix(8) As Double
                        Dim transform(3, 3) As Double
                        ufSes.Assem.AskComponentData(componentsToProcess(count).Tag, partName, refsetName, instanceName, origin, csysMatrix, transform)
                        Dim theLoadStatus As PartLoadStatus = Nothing
                        nxSes.Parts.Open(partName, theLoadStatus)
                    Next

                Catch ex As NXException
                    nxLw.WriteFullline(ex.ToString)
                End Try
            End If
         Catch ex As Exception
           nxLw.WriteFullline(ex.ToString)
        Finally
            If partLoadStatus1 IsNot Nothing AndAlso partLoadStatus1.NumberUnloadedParts > 0 Then
                nxLw.WriteFullline(vbCrLf & "Part Load Status Notes : ")
                For ii As Integer = 0 To partLoadStatus1.NumberUnloadedParts - 1
                    nxLw.WriteFullline("    " & partLoadStatus1.GetPartName(ii) & " - " & partLoadStatus1.GetStatusDescription(ii))
                Next
                nxLw.WriteFullline(vbCrLf)
            End If
        End Try
    End Sub
DHuskic Nx 9

Re: Update Undo Happened when attempting to OpenComponents and ReplaceReferenceSetInOwners

I believe these update errors I am getting are similar to the warning a user recieves when attempting to open up a component and have the features fail. If I open up the entire assembly, not load structure only, and not partial loading, I get this output:

 

============================================================
Information listing created by :  dhuskic
Date                           :  9/28/2016 2:13:24 PM
Current work part              :  U:\testing.prt
Node name                      :  cad51
============================================================
 
************************************************************
 
Update Warning and Failure Report
 
************************************************************
 
------------------------------------------------------------
part_LH
------------------------------------------------------------
Edge Blend(2)                   	Error: Referenced edge does not exist.
 
 
 
 
 
------------------------------------------------------------
part_cover
------------------------------------------------------------
Trim Body(279)                  	Error: The tool and target do not form a complete intersection.
 
 
 

DHuskic Nx 9

Re: Update Undo Happened when attempting to OpenComponents and ReplaceReferenceSetInOwners

In the code, you check for NX exception 670024, what error is that?

Re: Update Undo Happened when attempting to OpenComponents and ReplaceReferenceSetInOwners

[ Edited ]

Update Undo Happened. In which case, I try the other method of opening a part but from my understanding, that is not the proper way to open a part in an assembly. I might be wrong though. EDIT: or at least the other method didn't seem to work for us reliabibly.

DHuskic Nx 9