Showing results for
Do you mean

# How to get the text from a coordinate note using NX Open C++

How can I get the text from a coordinate note, for example, I want to get the text "MARK THIS END", first I need to get all the coordinate notes, and then I need to judge which one has the text "MARK THIS END" , but I just don't know how to get the text

## Re: How to get the text from a coordinate note using NX Open C++

[ Edited ]

Hi Jister,

here is an example VB code that should work, assuming that your text is the Suffix Label:

```Dim theSession As NXOpen.Session = NXOpen.Session.GetSession()
Dim thePart as Part = CType(theSession.Parts.BaseDisplay,Part)

For Each Annobj As Annotations.Annotation In thePart.PmiManager.PmiAttributes

Dim myCNote As Annotations.CoordinateNote = Nothing

myCNote = TryCast(Annobj, Annotations.CoordinateNote)

If IsNothing(myCNote) Then
Continue For
End If

Dim thebuilder As Annotations.CoordinateNoteBuilder = thePart.PmiManager.PmiAttributes.CreateCoordinateNoteBuilder(myCNote)

Dim CNSuffixLabel As String = thebuilder.StringSuffixLabel

If CNSuffixLabel.Equals("Test") Then
'do something
MsgBox("found!")
End If

thebuilder.Destroy()

Next```

Using these routines should also be possible in C++

regards,

MGeyer