Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can I use KF function in Formatting 2

Status
Not open for further replies.

jerry007

Aerospace
Jul 18, 2011
16
Is there anyway that I can use a KF function (such as stringReplace()) in a note Formatting box? and how?
 
Replies continue below

Recommended for you

Indirectly you should be able to do this. The problem is that a KF function, like any other 'routine', needs to be 'executed'. Unfortunately including something like that in a note does not mean that it will automatically be executed whenever a change is made the the source string. However, if you use these KF functions in something like an Expression (and since NX 5.0 Expressions as supported the manipulation of text strings) you can get them to 'execute', as it were.

John R. Baker, P.E.
Product 'Evangelist'
Product Design Solutions
Siemens PLM Software Inc.
Industry Sector
Cypress, CA

To an Engineer, the glass is twice as big as it needs to be.
 
Thanks John! Any idea where I can find the document for Expressions? Sorry, I am new to NX :)
 
Read the NX Help files. There's a section on using the built-in library of KF functions.

With the Expression dialog open, press the F1 key and the help page for Expressions will open. Go about 2/3 of the way down the page and you will find a section titled 'More Options' and below it is a picture of an icon with the 'function' symbol on it f(x) and the title 'Functions'. There are links here which will go to documents which will help you with using the built-in functions. Also, once you're using the function operation in the Expression editor, for each function selected there are additional help files which can be accessed from the function dialog which will go into more detail for each function.

John R. Baker, P.E.
Product 'Evangelist'
Product Design Solutions
Siemens PLM Software Inc.
Industry Sector
Cypress, CA

To an Engineer, the glass is twice as big as it needs to be.
 
John,

why NX is complaining w@db_part_no in the following expression?

replaceString(w@db_part_no, "S01", "Xyz")

what isthe right syntax?
 
I tried this in the expression editor and it worked:
Code:
replaceString( ug_askPartAttrValue( "DB_PART_NO" ), "S01", "XYZ" )
Then reference your new expression in the note instead of the attribute.
You may have to modify the above to point to the correct file from which you want to pull the DB_PART_NO attribute (eg you are using the master model method and are placing the note in the drawing file but pulling info from the model file).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor