×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Nx Journal bug in API??? componentpattern ==> getAllPatternMembers

Nx Journal bug in API??? componentpattern ==> getAllPatternMembers

Nx Journal bug in API??? componentpattern ==> getAllPatternMembers

(OP)
Hi all,

I'm trying to write a journal that reports all components of all component patterns in the workpart.
The problem is that i don't understand why my code does not work in NX9.0.3.4 MP8 while the same code works fine in NX10.
In NX9 it crashes on "GetAllPatternMembers()"

I think it is a bug is the API, but need to know for sure.
And of course any suggestions for a workaround would be great.

Thanks in advance
Fred

CODE --> vb

Option Strict Off
Imports System
Imports NXOpen
Imports NXOpen.Assemblies
Imports NXOpen.GeometricUtilities

Module report_all_component_patterns_in_workpart

    Sub Main(ByVal args() As String)

        Dim theSession As Session = Session.GetSession()
        Dim workPart As Part = theSession.Parts.Work
        Dim displayPart As Part = theSession.Parts.Display
        Dim lw As ListingWindow = theSession.ListingWindow
        Dim allCompPatterns As ComponentPatternCollection = workPart.ComponentAssembly.ComponentPatterns
        lw.Open()
		
        Dim patMemb() As PatternMember
        For Each compPattern1 As ComponentPattern In allCompPatterns
            lw.writeline(compPattern1.JournalIdentifier)
            lw.writeline(compPattern1.Tag)
            patMemb = compPattern1.GetAllPatternMembers()
			lw.writeline (patMemb.length)
        Next

    End Sub
End Module 

RE: Nx Journal bug in API??? componentpattern ==> getAllPatternMembers

If you suspect an API bug, your best bet is to contact GTAC.

www.nxjournaling.com

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources