Find the sheet name of a tablenote

Hi,

I want to find out the sheet name of a tablenote.
Tried using

"ufSession.View.AskViewDependentStatus(tableNote, out nTempInt, out strSheetName);"

but not getting the desired output.For some tablenotes in the sheet, it throws the sheetname but for some it doesn't.Unfortunately the table I am working on doesn't throw the sheetname.

Basically I want to update only the tablenote that appears on the working sheet not the other table notes in other sheets.Please advise.

Regards,
Aditya

The .AskViewDependentStatus function should work for all of them. If you want to email me an example file where it fails, I'd be glad to take a look (info@nxjournaling.com); but if you suspect it is a bug with the UF function, you will have to report it to GTAC to get fixed.

Hi,

Thanks for the response. Due to security reasons I am not able to email you the file.

If i can some how read the value from "W@$SH_SHEET_NUMBER" attribute my work is done. I have found out the note that contains "W@$SH_SHEET_NUMBER" but not able to translate the attribute to its value. Is there any way I can make use of it??

Below is the code snippet I tried


foreach (NXOpen.Annotations.Note a_note in NC)
{
strTemp2=a_note.GetText();

if (strTemp2[0].Contains("SHEET"))
{
try= (NXObject) workPart.FindObject(a_note.JournalIdentifier);
strTemp3 = associativeText1.GetObjectPropertyText(try, NXOpen.Annotations.AssociativeText.PropertyType.DrawingSheetName);
}

}

It returns null value.I am open to try any other way to get the sheet number or name.Please suggest.

Thanks,
Aditya

If the note references an attribute, you can use the .GetEvaluatedText method of an associative text object to decipher what the text says on the face of the drawing. Some examples are:

http://nxjournaling.com/content/extract-object-attributes-drawing-notes
http://nxjournaling.com/content/w36754