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 you add a refrence dimension to a note

Status
Not open for further replies.

aluminum2

Aerospace
Apr 27, 2010
218
I am wondering if you can add a reference dimension in a note. If you do that the expression name is gone and you cant use it in <Xm.n@exp_name> property. Any way around this.
 
Replies continue below

Recommended for you

If you are using a note, that is an expression, that contains another expression, then you cannot use a note for this. I ran into this same problem and found a way around it.

For Example:
<X00.0@myexp> (This is your note)
myexp: "Length: <mylength>"
mylength = 5

A note will fail in that situation, however, you can use a tabular table, and put the expression in a cell and have it display the values. Just remove all but 1 cell. Hope that helps.
 
What do you mean by "A note will fail in that situation..."?

What you get, and what you should expect to get, is the evaluated result of that expression.

So for example, if the Expressions read...

p1=10

p2=p1


...and I create a note linked to p2, the result will be '10' displayed as the text of the note.

Now is this not what you're getting?

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.
 
Create an expression, myexp = "This is a test"
Create a note on a drawing sheet that is the expression.
<x0.00@myexp> (This will display right)

Add another expression: myexp2 = 21.
Now, in the expression myexp
change myexp = "This is a test", to "This is another test, <X00.0@myexp2>"
Check the note, it will display: "This is another test, <X00.0@myexp2>"
 
I came across this problem when I was trying to link in strings from an excel spreadsheet, that would display values in the note linked to other expressions, and be triggered by a suppression by expression value, so an expression in and expression note. Which would fail, but if you put the same thing in a tabular note, it will work.
 
As a work around you can change your note 'text input' from "<X0.0@myexp>" to "<X0.0@myexp> <X0.0@myexp2>". This will combine the expressions in 1 note object.

Trouble might come when you want to insert something into the middle of an expression note. Maybe in that case you can break the note into parts and combine them as above.

Not a perfect solution, but may be workable.
 
That is true. But if you use tabular table, you can insert the note just fine and have it display just fine. It is just odd that it does not work the same when using a Note.
 
cstauffe said:
Create an expression, myexp = "This is a test". Create a note on a drawing sheet that is the expression <x0.00@myexp> (This will display right)

Add another expression: myexp2 = 21. Now, in the expression myexp change myexp = "This is a test", to "This is another test, <X00.0@myexp2>" Check the note, it will display: "This is another test, <X00.0@myexp2>"

This is working exactly as it's expected to work!!!

You cannot combine text and expressions in a String expression in that manner as it's reading everything that you entered as a literal string. If you want a single String expression to contain both text and the VALUE of an expression, you've got to be a bit more creative.

Try editing your expression to read:

myexp = "This is another test "+format("%0.0f",myexp2)

You have to use formatting statements based on the 'C' programming language. For information about these 'C' language string formatting statements, go to:


Note that the NX Expression system does not support all of these format commands, but it does support many of them, including the most commonly used ones.

Anyway, give that a try and see if this meets your needs.

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, I already found an alternative method. When you use a tabular table and put the expression name in the cell, it actually will read the expression in a string as its value. Thats why I was baffled by the note not working the same way.
 
But you were NOT dealing with a NOTE but rather a STRING Expression, which is another thing altogether.

When you create a note you can add multiple items since EACH one is formatted separately as a text string even if one was text and the other was a number, but in an expression if you wish to combine text and numbers you MUST provide the formatting statement(s) to convert the numerical data to a text string.

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.
 
While I would agree with you, this is not entirely true. I have an excel file with text reading my note. So for example, one of my notes is "The value is <X00.0@value> mm."
I have an expression mystring = (string) if(myval =1)(ug_read_cell = "path/excel.xls")Else("")
I then have a tabular table, inside one cell: <X0.00@mystring>, the output on the cell is "The value is 1 mm." So you see it works without formatting. This is why I was confused that it would work, I sort of found it by accident.
 
if(myval = 1)(ug_cell_read(NOTE_EXCEL_PATH,"A22"))Else("") More like this sorry.
 
That's because the contents of a 'tabular' note is stored as a 'spreadsheet' record, but you were talking about combining Expressions together, which is what I was offering a solution for.

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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor