I'm looking for an expression to use on balloon notes in the PMI function in NX. I'm fairly new on using expressions and I can't seem to find anything that is applicable to PMI.
So, what I want to do with my expression is this. The user sets a value (integer) in the Balloon Text field, and I want the expression to copy the value into the Title field. Preferrably I can have a set text string before the value in the title. Basically, I want the Title field locked with the same number as the text value, with a short text before. Something like this:
Any ideas on how to do this? Perhaps this can be done with another option other than expressions, I'm open to that as well. The simpler the solution, the better.
I've tried something similar to this a while ago but found it impossible to control directly.
You could create a separate expression that drives both the balloon and title field note, or you can create an attribute for your balloon that drives the note in the title field, but you can't make the balloon text entry drive the attribute, or make the note read the balloon directly... at least not without NXOpen API knowledge.
Just want to know why do you want a balloon note to drive your title block entry? Shouldn't it be the other way around?
Okay, thanks for the reply. How would you specifically create these two different expressions then?
Well, right now our designers are working with the note block. They are new to this part and we want a simple connection. If if works the other way around, with the title block controlling the note block, thats fine as well.
If working with expressions, first create a new user defined expression (ctrl+E), give it a name, type and value.
Let's create one named test, type -number, and make it a constant (no dimensionality).
Now you can reference it in a note, balloon or whatever by entering <X0.0@test>
The value of the expression is now displayed instead of a manually entered one.
You can reference it as many times as you want and will only have to change the value in one place.
The same works with attributes. Right click on your component in the assembly navigator -> properties and create a new attribute.
Now reference it with <WRef0*1@test2>, but I think attributes can only be referenced on drawings, not in 3D using PMI, not exactly sure.
I prefer using attributes pre-defined in seed parts so that the part name, number or other information is automatically read and displayed on the drawing without having to enter it manually.
If you are using Teamcenter, attribute mapping can be a very powerful and useful thing.
I see, so I can't reference another PMI attribute (such as Title or Balloon text) but I can set it first in expressions and reference to both in that way? I see the use for it, but not in our case since one expression will only be used twice, and about 20-50 expressions will be needed per assembly.
The part attribute reference seems more usable for us. It seems to work in 3D PMI also, somewhat. I seem to have to add the attribute into my expressions list before I can reference it.
Is this due to what you said about attributes not being reference-able in 3D PMI? Or am I referencing them incorrectly?
Yes, this is exactly what I meant, for some reason it doesn't work with PMI but works perfectly elswhere, you should ask GTAC why this is.
You can also go the long way and link your attribute to an expression and reference the expression in PMI as you described, but that seems a bit too much. Anyway, you can also create groups of expressions so they are easier to find and conrol directly from the part navigator so users can easily change the values.
You could sweeten the whole thing by creating a user interface with Block UI Styler or NXOpen, but I myself have very little experience with those, but there are lots of people in this community that could help you further with that.