cancel
Showing results for 
Search instead for 
Did you mean: 

Method for Origin of Tabular Note

Experimenter
Experimenter

Hi,

I have been searching the NXOpen .NET API Reference (NX 7.5) up and down, but I can not find any method that will tell me the Origin of a tabular note on a sheet. Any other values like cell text and relative text position I was able to get by using the various  NXOpen.UF.Tabnot methods. Another idea was to use the origin of the section. But here I was unable to convert the object which is linked to the section tag to a Section-object.

 

Small code sample:

Dim secTag As Tag = Tag.Null
theUFSession.Tabnot.AskSectionOfRow(rowTag, secTag)
Dim secObj As Object = NXObjectManager.Get(secTag)
Dim secSection As Section = CType(secObj, Section)

Best regards

Robert

3 REPLIES

Re: Method for Origin of Tabular Note

Honored Contributor
Honored Contributor

The .Drf.AskOrigin(...) function should work for this. Something like below (assuming you have a reference to a table note):

 

Dim tableOrigin(2) As Double
Dim tableSectionTag As Tag
theUfSession.Tabnot.AskNthSection(tableNote, 0, tableSectionTag)
theUfSession.Drf.AskOrigin(tableSectionTag, tableOrigin)

 

Re: Method for Origin of Tabular Note

Experimenter
Experimenter

Hello cowski1,

 

I implemented it and it's working as it should be. I am not very familiar with this older wrapper methods. Thank you very much! I think together with the relative position, width and height of each cell I can now define an absolute rectangle for each text cell in relation to the sheet origin. Or is there a simpler way?

 

 

Re: Method for Origin of Tabular Note

Honored Contributor
Honored Contributor

"is there an easier way?"

 

Not that I know of, at least not as of NX 8.5. I have some code that does something similar:

https://dl.dropboxusercontent.com/u/80688373/tag_note_text.vb

 

For some backstory of what the code does and why it was written, refer to:

http://www.eng-tips.com/viewthread.cfm?qid=359347