×
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

How to read all the notes in my drawing using NXOpen in NX 7.5 ?

How to read all the notes in my drawing using NXOpen in NX 7.5 ?

How to read all the notes in my drawing using NXOpen in NX 7.5 ?

(OP)
Hello Everyone ,

Can someone please let me know how can i read all the drawing notes in my drawing using NXOpen(i.e the Note Text , Origin etc) as i did not find any way to get the note collection in my drawings ?
A sample code snippet will be of good help.
Your help in this regard will be deeply appreciated.

Regards,
Amitabh

RE: How to read all the notes in my drawing using NXOpen in NX 7.5 ?

This is an example from UGAnswer web site.

CODE

Option Strict Off

Imports System
Imports NXOpen
Imports NXOpen.Annotations

Module report_all_notes_text

  Dim s As Session = Session.GetSession()
  Dim lw As ListingWindow = s.ListingWindow
  Dim dp As Part = s.Parts.Display
  Dim nc As NoteCollection = dp.Notes

Sub Main()

    lw.Open()

    For Each a_note As Note In nc
        Dim the_text() As String = a_note.GetText()

        lw.WriteLine("Note has " & the_text.Length.ToString & " lines")
        Dim ii As Integer

        For ii = 0 To the_text.Length - 1
            lw.WriteLine(the_text(ii))
        Next
        lw.WriteLine("")
    Next

End Sub

  Public Function GetUnloadOption(ByVal dummy As String) As Integer

      Return Session.LibraryUnloadOption.Immediately

  End Function

End Module 

Suresh
www.technisites.com.au

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