Tabular_note_type associative origin

Hello! I have a question how to get associativity to each drafting view for each tabular note. I now how that should be for annotations.tablesections type, some code below:

For Each table256 As Tag In thetablenotes256
'this is valid for tabular_note_section_subtype
Dim myTabNote As NXOpen.Annotations.TableSection
Dim point3d As Point3d
Dim origindata As Annotations.Annotation.AssociativeOriginData
Dim origintype As Annotations.AssociativeOriginType
myTabNote = NXObjectManager.Get(table256)
point3d = myTabNote.AnnotationOrigin
origindata = myTabNote.GetAssociativeOrigin(point3d)
origintype = origindata.OriginType.RelativeToView
If myTabNote.HasAssociativeOrigin Then
listofrelative.Add(myTabNote)
End If

But I need to get the similar approach for tabular_note_subtype tags in order to be able to get cell taxt after that.
Does Anybody know how set this up? Would be very appreciate for help.

thanks
E

If you have a reference to a table section, you can get the note it belongs to with the .AskTabularNoteOfSection method. This will return the tabular note tag that the section belongs to.

Thanks for advice! I`ve just used the similar method as you recomended (asknthsection) and get the section tag, after that I was able to use proper namespace for getting relative_to_view option. Here is a piece of code:

For Each table_1 As Tag In thetablenotes_1
Dim i As Integer = 0
Dim tablesection As Tag
theUfsession.Tabnot.AskNthSection(table_1,0,tablesection)
Dim myTabNote As NXOpen.Annotations.TableSection
myTabNote = Utilities.NXObjectManager.Get(tablesection)
Dim point3d As Point3d
Dim origindata As Annotations.Annotation.AssociativeOriginData
Dim origintype As Annotations.AssociativeOriginType
point3d = myTabNote.AnnotationOrigin
origindata = myTabNote.GetAssociativeOrigin(point3d)
origintype = origindata.OriginType.RelativeToView

If myTabNote.HasAssociativeOrigin Then
list_of_relative.Add(myTabNote)
End If

Thanks a lot for support!

thanks
E

Can I ask additional question? is it possible to get view name of view which is tablesections belongs to? Could you give any clue or maybe piece of code?

thanks
E

The "originData" should have an .AssociatedView property that will return the view the table is associated to. Once you have the view object, you can query its .Name property.