Showing results for 
Search instead for 
Did you mean: 

Identify Non NX font in the Drawing

Can I identify non-NX font in the drawing using NXOpen. Can anyone suggest me how to proceed?


Thanks in Advance


Re: Identify Non NX font in the Drawing

Honored Contributor
Honored Contributor

Each part has a .Fonts collection that you can iterate through to query the fonts. The .GetFontType method will tell you whether the font is an "NX" font or a true type font.

Re: Identify Non NX font in the Drawing

Esteemed Contributor
Esteemed Contributor

What do you mean by "non-nx font"?

- Something other than the "legacy" drafting fonts (blockfont/leroy/etc.)?

- modeling text vs drafting text?

- something else?


I think you just need to get a list of the legacy fonts (%UGII_BASE_DIR%\UGII\ugfonts) and compare the font of each piece of text to that list.

Don't forget drafting text can swap fonts mid-note using the "<Fn>...<F>" construct.


Check out the UF_UGFONT...() functions.  It could be that every (drafting) font used in drafting text *has* to be in the list, so by using UF_UGFONT_ask_number_of_fonts and UF_UGFONT_ask_font_name you can get the "complete" list of fonts that *might* be used in the part.  Note that just because "Arial" (or whatever) font is in the list, does not necessarily mean it is currently used in any drafting text in the part.





Ken Akerboom Sr CAx Systems Engr, Moog, Inc.
Production: NX10.0.3.5 MP5 + patch/TC11.2
I'd rather be e-steemed than e-diseaseled