Showing results for 
Search instead for 
Do you mean 
Reply
Solved! Go to solution

Get displayed text of attribute "SH_SHEET_NUMBER"

Hello everybody,

 

I'm looking for a way to get the displayed text of a note that uses this attribute reference: "<W@$SH_SHEET_NUMBER>"

 

The displayed text is "2" (sheet number 2).

If I ask the note using MyNote.GetText() it will return the definition string, but I found no way to get out the displayed text "2".

(NX version 8.5) 

 

Any help is very appreciated.

Herbert Macho
EBNER Industrieofenbau
AUSTRIA

NX10.0.3.5 (TeamCenter10 and Native)
3 REPLIES
Solution
Solution
Accepted by topic author MacFurnace
‎12-09-2015 09:46 AM

Re: Get displayed text of attribute "SH_SHEET_NUMBER"

 

Good morning.  You need the AssociativeText.GetEvaluatedText() method.  It was new in NX8, so it should be available to you in NX8.5.  Here is a note about it from the documentation:

 

"Annotation used to determine the object property value when the object is not specified. For example, given annotation 123 and 456 where 123 resides in "Sheet 1" and 456 resides in "Sheet 2" then the evaluated text returned for the input text "<W@$SH_SHEET_NAME>" for annotation 123 is "Sheet 1" and for annotation 456 is "Sheet 2""

 

Regards,

 

Steve

 

 

 

Solution
Solution
Accepted by topic author MacFurnace
‎12-09-2015 09:46 AM

Re: Get displayed text of attribute "SH_SHEET_NUMBER"

You can use the .GetEvaluatedText method to get what text is displayed on the drawing. The GTAC solution center has an example, nx_api4613.

Solution
Solution
Accepted by topic author MacFurnace
‎12-09-2015 09:46 AM

Re: Get displayed text of attribute "SH_SHEET_NUMBER"

Gentlemen,

many thanks for your help! Works PERFECT!

 

Best regards

Herbert Macho
EBNER Industrieofenbau
AUSTRIA

NX10.0.3.5 (TeamCenter10 and Native)