cancel
Showing results for 
Search instead for 
Did you mean: 

Get displayed text of attribute "SH_SHEET_NUMBER"

Valued Contributor
Valued Contributor

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

Re: Get displayed text of attribute "SH_SHEET_NUMBER"

Siemens Phenom Siemens Phenom
Siemens Phenom

 

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

 

 

 

Re: Get displayed text of attribute "SH_SHEET_NUMBER"

Honored Contributor
Honored Contributor

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

Re: Get displayed text of attribute "SH_SHEET_NUMBER"

Valued Contributor
Valued Contributor

Gentlemen,

many thanks for your help! Works PERFECT!

 

Best regards

Herbert Macho
EBNER Industrieofenbau
AUSTRIA

NX10.0.3.5 (TeamCenter10 and Native)