Reading a wavelink which is already created

Hi all,
I am trying to read a wavelink coordinateSystem.
UFWave.LinkedFeatureInfo info;
theUfSession.Wave.AskLinkedFeatureInfo(waveLinkCoordinateSystem1.Tag, out info);

I am using below method to read LinkedFeatureInfo. but it just tells about source_part_name and I am looking for the Component instead of name. Somehow I am able to find OwningPart but Owning component is NULL.

My requirement is to SetWorkComponent(), after finding this owningComponent. If I use just SetWork( PART) then it does not make correct component as workComponent and picks up some other component with same instance.

You are working in an assembly and you have a reference to a wave-linked coordinate system, now you want to find the component that owns the source csys and set that as the work part. Is this correct?

Can you provide a small example file? Email it to: info@nxjournaling.com.

Here's my first stab at it. There MUST be an easier way; let me know how it goes...

Option Strict Off
Imports System
Imports NXOpen
Imports NXOpen.Features
Imports NXOpen.UF
 
Module Module1
 
    Dim theSession As Session = Session.GetSession()
    Dim theUfSession As UFSession = UFSession.GetUFSession()
 
    Sub Main()
 
        Dim workPart As Part = theSession.Parts.Work
        Dim initialPart As Part = theSession.Parts.Work
        Dim lw As ListingWindow = theSession.ListingWindow
        lw.Open()
 
        Dim myModelingTolerance As Double
        theUfSession.Modl.AskDistanceTolerance(myModelingTolerance)
 
 
        Dim featArray() As Feature = theSession.Parts.Work.Features.GetFeatures()
 
        For Each myFeature As Feature In featArray
            'lw.WriteLine(myFeature.GetFeatureName)
            'lw.WriteLine(myFeature.FeatureType)
            'lw.WriteLine("")
 
            If myFeature.GetFeatureName.ToUpper.Contains("LINKED DATUM COORDINATE SYSTEM") Then
 
                lw.WriteLine("feature: " & myFeature.GetFeatureName)
 
                Dim myDatumCsys = myFeature
                Dim myDatumPoint As Point
                lw.WriteLine("location: " & myDatumCsys.Location.ToString)
 
                For Each temp As NXObject In myDatumCsys.GetEntities
                    'lw.WriteLine("entity: " & temp.GetType.ToString)
                    If temp.GetType.ToString.ToLower.Contains("point") Then
                        myDatumPoint = temp
                    End If
                Next
                lw.WriteLine("")
 
                lw.WriteLine("linked datum csys found")
                Dim sourceTag As Tag
                Dim linkBroken As Boolean = True
                theUfSession.Wave.IsLinkBroken(myFeature.Tag, linkBroken)
                If linkBroken Then
                    lw.WriteLine("link to parent geometry is broken")
                Else
                    theUfSession.Wave.AskLinkSource(myFeature.Tag, True, sourceTag)
                    If sourceTag = Tag.Null Then
                        lw.WriteLine("could not fully load parent file...")
                    Else
                        Dim myTaggedObj As TaggedObject
                        Dim sourceCsys As CartesianCoordinateSystem
                        Dim sourceFile As Part
                        myTaggedObj = theSession.GetObjectManager.GetTaggedObject(sourceTag)
 
                        lw.WriteLine("object source type: " & myTaggedObj.GetType.ToString)
 
                        sourceCsys = myTaggedObj
                        sourceFile = sourceCsys.OwningPart
                        lw.WriteLine("parent file: " & sourceFile.FullPath)
 
                        Dim partTag As Tag = sourceFile.Tag
                        Dim occTags() As Tag
                        theUfSession.Assem.AskOccsOfPart(Tag.Null, partTag, occTags)
                        lw.WriteLine("number of occurences: " & occTags.Length.ToString)
                        For Each temp As Tag In occTags
                            Dim myComp As Assemblies.Component
                            myComp = Utilities.NXObjectManager.Get(temp)
 
                            lw.WriteLine("")
                            lw.WriteLine("component name: " & myComp.Name)
                            lw.WriteLine("component display name: " & myComp.DisplayName)
                            lw.WriteLine("")
 
 
                            'make comp work part, create point at csys origin, measure dist datum csys to point
                            Dim markId1 As Session.UndoMarkId
                            markId1 = theSession.SetUndoMark(Session.MarkVisibility.Visible, "Make Work Part")
 
                            Dim partLoadStatus1 As PartLoadStatus
                            theSession.Parts.SetWorkComponent(myComp, PartCollection.RefsetOption.Current, PartCollection.WorkComponentOption.Visible, partLoadStatus1)
 
                            workPart = theSession.Parts.Work
                            partLoadStatus1.Dispose()
 
                            Dim sourcePoint As Point
                            sourcePoint = workPart.Points.CreatePoint(sourceCsys.Origin)
                            sourcePoint.SetVisibility(SmartObject.VisibilityOption.Visible)
 
                            If MeasureDistance(myDatumPoint, sourcePoint) < myModelingTolerance Then
                                Exit For
 
                            Else
                                'reset work part
                                Dim markId2 As Session.UndoMarkId
                                markId2 = theSession.SetUndoMark(Session.MarkVisibility.Visible, "Make Work Part")
 
                                Dim nullAssemblies_Component As Assemblies.Component = Nothing
 
                                Dim partLoadStatus2 As PartLoadStatus
                                theSession.Parts.SetWorkComponent(nullAssemblies_Component, PartCollection.RefsetOption.Current, PartCollection.WorkComponentOption.Visible, partLoadStatus2)
 
                                workPart = theSession.Parts.Work
                                partLoadStatus2.Dispose()
 
                            End If
 
                        Next
 
                    End If
 
                End If
 
 
            End If
 
 
        Next
 
        lw.WriteLine("")
        lw.Close()
 
    End Sub
 
    Function MeasureDistance(ByVal obj1 As DisplayableObject, ByVal obj2 As DisplayableObject) As Double
 
        Dim result As Double
 
        Try
            Dim nullNXObject As NXObject = Nothing
 
            Dim measureDistanceBuilder1 As MeasureDistanceBuilder
            measureDistanceBuilder1 = theSession.Parts.Display.MeasureManager.CreateMeasureDistanceBuilder(nullNXObject)
 
            measureDistanceBuilder1.InfoWindow = False
 
            measureDistanceBuilder1.Mtype = MeasureDistanceBuilder.MeasureType.Minimum
 
            Dim nullUnit As Unit = Nothing
 
            Dim measureDistance1 As MeasureDistance
            measureDistance1 = theSession.Parts.Display.MeasureManager.NewDistance(nullUnit, MeasureManager.MeasureType.Minimum, obj1, obj2)
 
            result = measureDistance1.Value
 
            'measureDistance1.Information()
 
            measureDistance1.Dispose()
 
        Catch ex As NXException
            MsgBox(ex.Message)
            Return Nothing
 
        End Try
 
 
        Return result
 
    End Function
 
    Public Function GetUnloadOption(ByVal dummy As String) As Integer
 
        'Unloads the image when the NX session terminates
        GetUnloadOption = NXOpen.Session.LibraryUnloadOption.AtTermination
 
        '----Other unload options-------
        'Unloads the image immediately after execution within NX
        'GetUnloadOption = NXOpen.Session.LibraryUnloadOption.Immediately
 
        'Unloads the image explicitly, via an unload dialog
        'GetUnloadOption = NXOpen.Session.LibraryUnloadOption.Explicitly
        '-------------------------------
 
    End Function
 
End Module

I had already tried something like - theUfSession.Assem.AskOccsOfPart(Tag.Null, partTag, occTags); but occTags is coming as Null.
This issue got solved using two methods and I think that is the only way to solve this.
theUFSession.Wave.AskLinkXform(theFeature.Tag, out xform);
theUFSession.So.AskAssyCtxtPartOcc()
This way I got the component instead of part.

Thanks all.
Regards,
Ankita

~ Ankita

Life is beautiful. :)

That sounds like a better solution than what I posted.

Thanks for posting back with the info!

Can you post your code?

NX 8.5
NX 9.0

I believe I'm trying to do the same thing. I have some components that contains many features, some linked, some not linked. For the linked features I'd like to get the owning component of the other side of the link. So for example, I have a component with some drilled false bodies, these false bodies are wave linked to bodies within another component, this is the component that I want to eventually get.

Let me know if that was a confusing description.

Here's where I am now:

 For Each feature As Feature In _workPart.Features.GetFeatures
                        Lw.WriteLine(feature.GetFeatureName)
                        Lw.WriteLine(feature.GetType.ToString)
 
                        Dim sourceTag As Tag
                        Dim linkBroken As Boolean = True
                        UfSession.Wave.IsLinkBroken(feature.Tag, linkBroken)
 
                        If Not linkBroken Then
                            UfSession.Wave.AskLinkSource(feature.Tag, True, sourceTag)
                            If sourceTag = Tag.Null Then
                                Lw.WriteLine("Not found")
                            Else
                                Dim myTaggedObj As TaggedObject = NxSession.GetObjectManager.GetTaggedObject(sourceTag)
 
                                Lw.WriteLine("object soucre type: " & myTaggedObj.GetType.ToString)
 
                            End If
                        End If
                    Next

This is the error I'm receiving:

"NXOpen.NXException: The first parameter passed in was invalid. at NXOpen.UF.UFWave.IsLinkBroken(Tag linked_feature, Boolean_is_broken)".



So from what I can tell, it's breaking because I am not passing in a linked_feature. I tried the method UF_GDT_is_linked_feature but that returned a similar error.

NX 8.5
NX 9.0

You should only pass wave linked features to those functions.


The following code shows one way to find linked features:




Option Strict Off
Imports System
Imports NXOpen
Imports NXOpen.UF
 
Module Module1
 
    Sub Main()
 
        Dim theSession As Session = Session.GetSession()
        Dim theUfSession As UFSession = UFSession.GetUFSession
 
        If IsNothing(theSession.Parts.Work) Then
            'active part required
            Return
        End If
 
        Dim workPart As Part = theSession.Parts.Work
        Dim lw As ListingWindow = theSession.ListingWindow
        lw.Open()
 
        For Each theFeature As Features.Feature In workPart.Features
            If theFeature.FeatureType.Contains("LINKED") Then
                lw.WriteLine("Linked feature found:")
                lw.WriteLine("  " & theFeature.GetFeatureName)
                lw.WriteLine("")
            End If
        Next
 
        lw.Close()
 
    End Sub
 
End Module

Really appreciate the help. Thanks.

NX 8.5
NX 9.0

Hi,
I have an idealized part with wavelink bodies that were created from components in the master part. I'm trying to find the components used to create the wavelinks, but I can only find the part prototype. I'm trying to use the solution in this post, using methods: theUFSession.Wave.AskLinkXform(theFeature.Tag, out xform) and theUFSession.So.AskAssyCtxtPartOcc(), but I don't understand the 2nd argument to pass to AskAssyCtxtPartOcc. Can someone explain what the to_part_occ should be and how to retrieve it?
Thanks

The second argument, "to_part_occ", should be the tag of the component that owns the linked feature.

Below is a short journal illustrating the use of AskAssyCtxtPartOcc.
To use it, create a small assembly: add a part as a component - specify a number of duplicates (spread them out - use the "scatter" option). Add a new empty part as a component and create a wave linked mirror body feature in the new part; pick any component instance you like to be the parent of the mirror body. Give the "parent component" a unique name, this will help when testing the journal (RMB the component, properties, general, enter name, OK). Run the journal with the assembly as the displayed/work part. The journal will process all the components and report the parent component of the linked mirror body. Parts must be fully loaded for the journal to work, journal only reports the first linked mirror body found in each component. The same strategy will work for other linked features, this journal only looks specifically for linked mirror bodies.

Option Strict Off
Imports System
Imports NXOpen
Imports NXOpen.Assemblies
Imports NXOpen.UF
 
Module Module1
 
    Dim theSession As Session = Session.GetSession()
    Dim theUfSession As UFSession = UFSession.GetUFSession()
 
    Dim lw As ListingWindow = theSession.ListingWindow
 
    Sub Main()
 
        If IsNothing(theSession.Parts.BaseWork) Then
            'active part required
            Return
        End If
 
        Dim workPart As Part = theSession.Parts.Work
        lw.Open()
 
        Const undoMarkName As String = "NXJ journal"
        Dim markId1 As Session.UndoMarkId
        markId1 = theSession.SetUndoMark(Session.MarkVisibility.Visible, undoMarkName)
 
        Try
            Dim c As ComponentAssembly = theSession.Parts.Display.ComponentAssembly
            If Not IsNothing(c.RootComponent) Then
                'lw.WriteLine("processing components...")
                ProcessChildren(c.RootComponent, 0)
            Else
                '*** insert code to process piece part
                'lw.WriteLine("Part has no components")
            End If
        Catch e As Exception
            theSession.ListingWindow.WriteLine("Failed: " & e.ToString)
        End Try
 
 
        lw.Close()
 
    End Sub
 
    Sub ProcessChildren(ByVal comp As Component, _
    ByVal indent As Integer)
 
        'lw.WriteLine("component: " & comp.DisplayName)
 
        Dim linkedFeature As Features.Feature
 
        For Each child As Component In comp.GetChildren()
            Dim part1 As Part = child.Prototype.OwningPart
            linkedFeature = ProcessFeatures(part1)
            If Not IsNothing(linkedFeature) Then
 
                Dim theXformTag As Tag
                Dim fromPartOccTag As Tag
                Dim fromComp As Assemblies.Component
 
                theUfSession.Wave.AskLinkXform(linkedFeature.Tag, theXformTag)
                theUfSession.So.AskAssyCtxtPartOcc(theXformTag, child.Tag, fromPartOccTag)
 
                fromComp = Utilities.NXObjectManager.Get(fromPartOccTag)
 
                lw.WriteLine("linked from part: " & fromComp.Prototype.OwningPart.Leaf & " [component name: " & fromComp.Name & "]")
                lw.WriteLine("")
 
            End If
            ProcessChildren(child, indent + 1)
        Next
 
    End Sub
 
    Function ProcessFeatures(ByVal thePart As Part) As Features.Feature
 
        'return first linked mirror feature
 
        For Each myfeature As Features.Feature In thePart.Features
 
            If myfeature.FeatureType = "LINKED_MIRROR" Then
                lw.WriteLine("linked mirror body feature found in part: " & thePart.Leaf)
                Return myfeature
            End If
 
        Next
 
        Return Nothing
 
    End Function
 
    Public Function GetUnloadOption(ByVal dummy As String) As Integer
 
        'Unloads the image immediately after execution within NX
        GetUnloadOption = NXOpen.Session.LibraryUnloadOption.Immediately
 
    End Function
 
End Module

Many thanks.

Hello,

I'm attempting to find the parent part name of a feature on the current work part. This feature is wavelinked to a part file that is not present in this sub-assembly. I'm wondering how to obtain this parent part name string, I believe this is possible because NX can pull up the information while we try to edit the feature.

Please reference this photo to help understand what we're trying to do.

http://imgur.com/wPLaExH

Thank you

NX 8.5
NX 9.0

The code below should do what you want. I was working on it for an article on wave features, but got pulled away. The code could use a bit more testing and polish; post back or email me (info@nxjournaling.com) if you run into any issues. The code was written/tested on NX 9, but I don't think it uses any functionality exclusive to NX 9; it should work on 8.5.

'NX 9
 
'Journal acts on the currently displayed part. A report will be
'generated for the linked features in the part.
 
'the report takes the form:
'name of part
'[summary]
'  number of linked features: number broken links
'  list of features with broken links
'  list of external parts used by wave linked features
'[detail]
'  list of wave linked features
'  feature name
'    part referenced by link
 
'Journal code references classes:
'  WaveLinkReport
'  WaveFeature
 
Option Strict Off
Imports System
Imports System.Collections.Generic
Imports NXOpen
Imports NXOpen.UF
Imports NXOpen.Assemblies
 
Module wave_links_part_only
 
    Dim theSession As Session = Session.GetSession()
    Dim theUfSession As UFSession = UFSession.GetUFSession
 
    Dim lw As ListingWindow = theSession.ListingWindow
 
    Sub Main()
 
        If IsNothing(theSession.Parts.Work) Then
            'active part required
            Return
        End If
 
        Dim workPart As Part = theSession.Parts.Work
        lw.Open()
 
        Const undoMarkName As String = "report wave links"
        Dim markId1 As Session.UndoMarkId
        markId1 = theSession.SetUndoMark(Session.MarkVisibility.Visible, undoMarkName)
 
 
        Dim theWaveLinks As New WaveLinkReport(theSession.Parts.Display)
        ReportWaveLinks(theWaveLinks, False)
 
 
        lw.Close()
 
    End Sub
 
    Sub ReportWaveLinks(ByVal someLinkReport As WaveLinkReport, ByVal suppressNull As Boolean)
 
        If suppressNull And someLinkReport.WaveFeatures.Count = 0 Then
            Return
        End If
 
        lw.WriteLine(New String("=", someLinkReport.Part.FullPath.Length))
        lw.WriteLine(someLinkReport.Part.FullPath)
        lw.WriteLine(New String("=", someLinkReport.Part.FullPath.Length))
 
        If someLinkReport.WaveFeatures.Count = 0 Then
            'no wave features to report
            lw.WriteLine("  this part contains no wave linked features")
            lw.WriteLine("")
            Return
        End If
 
        If someLinkReport.WaveFeatures.Count = 1 Then
            lw.WriteLine("There is " & someLinkReport.WaveFeatures.Count.ToString & " linked feature: " & someLinkReport.NumberOfBrokenLinks.ToString & " broken")
        Else
            lw.WriteLine("There are " & someLinkReport.WaveFeatures.Count.ToString & " linked features: " & someLinkReport.NumberOfBrokenLinks.ToString & " broken")
        End If
 
        For Each tempBroken As WaveFeature In someLinkReport.BrokenLinks
            lw.WriteLine("  " & tempBroken.Feature.GetFeatureName)
        Next
        lw.WriteLine("")
 
        lw.WriteLine("Wave link feature unique parent parts:")
        For Each tempString As String In someLinkReport.UniqueWaveParents
            lw.WriteLine("  " & tempString)
        Next
        lw.WriteLine("")
 
        lw.WriteLine("Wave link features [" & someLinkReport.WaveFeatures.Count.ToString & "]")
        lw.WriteLine(New String("-", 30))
 
        For Each temp As WaveFeature In someLinkReport.WaveFeatures
            lw.WriteLine(temp.Feature.GetFeatureName)
            If temp.IsBroken Then
                If temp.IsAccepted Then
                    lw.WriteLine("  %% LINK BROKEN/ACCEPTED")
                Else
                    lw.WriteLine("  !! LINK BROKEN")
                End If
            End If
            'lw.WriteLine("  Wave parent(s):")
            For Each parent As String In temp.WaveParents
                lw.WriteLine("    " & parent)
            Next
            lw.WriteLine("")
        Next
 
        lw.WriteLine("")
 
    End Sub
 
    Public Function GetUnloadOption(ByVal dummy As String) As Integer
 
        'Unloads the image immediately after execution within NX
        GetUnloadOption = NXOpen.Session.LibraryUnloadOption.Immediately
 
    End Function
 
End Module
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Public Class WaveLinkReport
 
    Private cSession As Session = Session.GetSession
    Private cUfSession As UFSession = UFSession.GetUFSession
 
 
    Private cPart As Part
    Public Property Part() As Part
        Get
            Return cPart
        End Get
        Set(ByVal value As Part)
            cPart = value
            Me.ExamineFeatures()
            Me.FindUniqueParents()
        End Set
    End Property
 
    Private cWaveFeatures As New List(Of WaveFeature)
    Public ReadOnly Property WaveFeatures() As List(Of WaveFeature)
        Get
            Return cWaveFeatures
        End Get
    End Property
 
    Private cUniqueWaveParents As New List(Of String)
    Public ReadOnly Property UniqueWaveParents() As List(Of String)
        Get
            Return cUniqueWaveParents
        End Get
    End Property
 
    Public ReadOnly Property NumberOfBrokenLinks() As Integer
        Get
            Return cBrokenLinks.Count
        End Get
    End Property
 
    Private cBrokenLinks As New List(Of WaveFeature)
    Public ReadOnly Property BrokenLinks() As List(Of WaveFeature)
        Get
            Return cBrokenLinks
        End Get
    End Property
 
 
 
 
    Public Sub New(ByVal thePart As Part)
 
        Me.Part = thePart
 
    End Sub
 
 
    Private Sub ExamineFeatures()
 
        For Each tempFeature As Features.Feature In cPart.Features
 
            If IsWaveFeature(tempFeature) Then
 
                Dim newWaveFeature As New WaveFeature(tempFeature)
                cWaveFeatures.Add(newWaveFeature)
 
            End If
 
        Next
 
    End Sub
 
    Private Function IsWaveFeature(ByVal theFeature As Features.Feature) As Boolean
 
        Dim wave2 As Boolean = False
 
        'check for wave linked sketch
        'linked sketches can be internal to another feature (such as an extrude)
        'so check for a WaveSketch feature before running the .IsInternal check
        If TypeOf (theFeature) Is NXOpen.Features.WaveSketch Then
            wave2 = Me.IsWaveFeature2(theFeature)
            Return True
        End If
 
        'some features create links within the part file (extract face, instance geometry, etc)
        'if the feature .IsInternal, odds are good it links to something in this part file
        'and not an external file
        If theFeature.IsInternal Then
            wave2 = Me.IsWaveFeature2(theFeature)
 
            'skip features such as "mirror geometry" or "instance geometry" that do not link to another part
            Return False
        End If
 
        'check for wave linked datum
        If TypeOf (theFeature) Is NXOpen.Features.WaveDatum Then
            wave2 = Me.IsWaveFeature2(theFeature)
 
            Return True
        End If
 
        'check for wave linked point
        If TypeOf (theFeature) Is NXOpen.Features.WavePoint Then
            wave2 = Me.IsWaveFeature2(theFeature)
 
            Return True
        End If
 
        'check for wave linked curve
        If TypeOf (theFeature) Is NXOpen.Features.CompositeCurve AndAlso theFeature.FeatureType = "LINKED_CURVE" Then
            wave2 = Me.IsWaveFeature2(theFeature)
 
            Return True
        End If
 
        'check for wave linked face
        If TypeOf (theFeature) Is NXOpen.Features.ExtractFace AndAlso theFeature.FeatureType = "LINKED_FACE" Then
            wave2 = Me.IsWaveFeature2(theFeature)
 
            Return True
        End If
 
        'check for wave linked region
        If TypeOf (theFeature) Is NXOpen.Features.ExtractFace AndAlso theFeature.FeatureType = "LINKED_REGION" Then
            Return True
        End If
 
        'check for wave linked body
        If TypeOf (theFeature) Is NXOpen.Features.ExtractFace AndAlso theFeature.FeatureType = "LINKED_BODY" Then
            wave2 = Me.IsWaveFeature2(theFeature)
 
            Return True
        End If
 
        'check for wave linked mirror body
        If TypeOf (theFeature) Is NXOpen.Features.MirrorBody AndAlso theFeature.FeatureType = "LINKED_MIRROR" Then
            Return True
        End If
 
        'check for wave linked routing object
        If TypeOf (theFeature) Is NXOpen.Features.WaveRouting Then
            wave2 = Me.IsWaveFeature2(theFeature)
 
            Return True
        End If
 
        'none of the above...
        Return False
 
    End Function
 
    Private Function IsWaveFeature2(ByVal theFeature As Features.Feature) As Boolean
 
        Dim lw As ListingWindow = cSession.ListingWindow
        lw.Open()
 
        'lw.WriteLine("feature: " & theFeature.GetFeatureName)
        'lw.WriteLine("owning part: " & theFeature.OwningPart.Leaf)
 
        Dim theSourceEntityTag As NXOpen.Tag = NXOpen.Tag.Null
        Dim owningSourcePartTag As Tag = NXOpen.Tag.Null
        Dim allowLoad As Boolean = True
        Dim owningPartName As String = ""
 
 
        Try
            '.AskLinkSource throws error if link is internal to the part being processed
            '(simple hole, mirror geometry)
            cUfSession.Wave.AskLinkSource(theFeature.Tag, allowLoad, theSourceEntityTag)
            cUfSession.Obj.AskOwningPart(theSourceEntityTag, owningSourcePartTag)
            cUfSession.Part.AskPartName(owningSourcePartTag, owningPartName)
 
 
        Catch ex As NXException
            If ex.ErrorCode = 1105004 Then
                'first parameter passed in was invalid (not linked to external geometry?)
                'lw.WriteLine("NX exception: " & ex.ErrorCode & ", " & ex.Message)
                'lw.WriteLine("")
                Return False
            Else
                'lw.WriteLine("NX exception: " & ex.ErrorCode & ", " & ex.Message)
                'lw.WriteLine("")
                Return False
            End If
        Catch ex As Exception
            lw.WriteLine("Exception: " & ex.Message)
            lw.WriteLine("")
        End Try
 
        lw.WriteLine("source part: " & owningPartName)
        lw.WriteLine("current part: " & theFeature.OwningPart.FullPath)
        'lw.WriteLine("")
 
 
        If owningPartName.ToUpper = theFeature.OwningPart.FullPath.ToUpper Then
            'lw.WriteLine("IsWaveFeature2: False")
            'lw.WriteLine("")
 
            Return False
        Else
            'lw.WriteLine("IsWaveFeature2: True")
            'lw.WriteLine("")
 
            Return True
 
        End If
 
 
        lw.Close()
 
 
    End Function
 
    Private Sub FindUniqueParents()
 
        For Each tempWF As WaveFeature In Me.WaveFeatures
            If tempWF.IsBroken Then
                cBrokenLinks.Add(tempWF)
            End If
            For Each tempString As String In tempWF.WaveParents
                If Not cUniqueWaveParents.Contains(tempString) Then
                    cUniqueWaveParents.Add(tempString)
                End If
            Next
        Next
 
        cUniqueWaveParents.Sort()
 
    End Sub
 
End Class
 
 
 
 
 
Public Class WaveFeature
 
    Private cSession As Session = Session.GetSession
    Private cUfSession As UFSession = UFSession.GetUFSession
 
    Private cFeature As Features.Feature
    Public Property Feature() As Features.Feature
        Get
            Return cFeature
        End Get
        Set(ByVal value As Features.Feature)
            cFeature = value
            Me.ExamineFeature()
        End Set
    End Property
 
    Private cParents As New List(Of String)
    Public ReadOnly Property WaveParents() As List(Of String)
        Get
            Return cParents
        End Get
    End Property
 
    Private cIsBroken As Boolean = True   'assume link is broken
    Public ReadOnly Property IsBroken() As Boolean
        Get
            Return cIsBroken
        End Get
    End Property
 
    Private cIsAccepted As Boolean = False  'assume it is not broken intentionally
    Public ReadOnly Property IsAccepted() As Boolean
        Get
            Return cIsAccepted
        End Get
    End Property
 
 
    Public Sub New(ByVal theFeature As Features.Feature)
 
        Me.Feature = theFeature
 
    End Sub
 
    Private Sub ExamineFeature()
 
        Dim sourcePart As String = ""
        Dim sourceId As String = ""
 
        cUfSession.Wave.IsLinkBroken(cFeature.Tag, cIsBroken)
 
        If cIsBroken Then
            cIsBroken = True
            cUfSession.Wave.AskBrokenLinkSourcePart(cFeature.Tag, sourcePart, sourceId)
            cParents.Add(sourcePart)
 
            cUfSession.Wave.AskLinkAcceptBroken(cFeature.Tag, cIsAccepted)
 
        Else
            'link NOT broken
 
            'ref: nx_api4930
            Dim theInfo As UFWave.LinkedFeatureInfo
            cUfSession.Wave.AskLinkedFeatureInfo(cFeature.Tag, theInfo)
            Dim sources() As String = theInfo.source_part_name.Split(",")
 
            'wave feature may have multiple parents; e.g. the mirror body
            '  mirror plane may be owned by a file other than the file that owns the body
            For Each prtSource As String In sources
                cParents.Add(prtSource)
            Next
 
        End If
 
 
    End Sub
 
End Class

Thanks, the Journal worked great!

NX 8.5
NX 9.0