removing trailing zeros in parts list qty field using object attribute relationships
removing trailing zeros in parts list qty field using object attribute relationships
(OP)
I have an assembly which uses one material stocked by the foot. The drawing default units is inches and most of the qty columns are per (normal qty of an item). I created in expression in this component part file (also in inches) linked to the sketch perimeter. I then have it converted to feet and then rounded to the nearest hundredth (x.xx) with another epxression. Then I linked this expression to a part property.
In the assembly I have edited the qty cell and created a relationship to the part property of that component in the assembly via object attribute.
In the component, I did have to make the file part property unitless or else NX converts it back to inches, displaying the incorrect value.
In the assembly parts list I also had to set the cell style format to text and I added a suffix of FT (although this is also noted in the description of the components).
The issue remaining is that I have trailing zeros displaying in the parts list qty field of this item. It should display .87 feet for example (as it does in the component expression and in the components file property, but instead it displays .870000. Is the problem with the parts list, how the rounding was performed? I do not see any settings in the cell, column or parts list styles that control this. I also shut off trailing zeros in annotation preferences and this had no effect.
thanks
In the assembly I have edited the qty cell and created a relationship to the part property of that component in the assembly via object attribute.
In the component, I did have to make the file part property unitless or else NX converts it back to inches, displaying the incorrect value.
In the assembly parts list I also had to set the cell style format to text and I added a suffix of FT (although this is also noted in the description of the components).
The issue remaining is that I have trailing zeros displaying in the parts list qty field of this item. It should display .87 feet for example (as it does in the component expression and in the components file property, but instead it displays .870000. Is the problem with the parts list, how the rounding was performed? I do not see any settings in the cell, column or parts list styles that control this. I also shut off trailing zeros in annotation preferences and this had no effect.
thanks
NX 8.0.1.5





RE: removing trailing zeros in parts list qty field using object attribute relationships
RE: removing trailing zeros in parts list qty field using object attribute relationships
thread561-232209: Having fun with Expressions...
www.nxjournaling.com
RE: removing trailing zeros in parts list qty field using object attribute relationships
NX 8.0.1.5
RE: removing trailing zeros in parts list qty field using object attribute relationships
www.nxjournaling.com
RE: removing trailing zeros in parts list qty field using object attribute relationships
NX 8.0.1.5
RE: removing trailing zeros in parts list qty field using object attribute relationships
As a workaround you might want to link to one of your expressions in the note instead of an attribute. Open the annotation editor, expand the 'text input' -> 'symbols' sections, choose relationships -> insert expression -> link to part, choose the part that contains your length expression, the expression of interest, finally change the format and press OK. The value of 'format' (mine shows as 0.2) will determine how the number is displayed; a zero before the decimal point indicates no leading zero (a one would give you a leading zero), the number after the decimal is how many places you want displayed after the decimal. This will fill out your text input section with something like: <X0.2@drf_1>
Copy and paste this text into your tabular note cell and add any additional text you wish.
www.nxjournaling.com
RE: removing trailing zeros in parts list qty field using object attribute relationships
As for your second suggestion (not a work around, just a slightly different approach) I hadn't tried this, but it works as well!
This is how we forge new ground. We get an application to try something, we do, then we share these things once a week. Someone else may experiment with it or expand on the process in a different manner and we move on. Eventually, we decide on best practices and which ones are more effort than they are worth. How do others do these things?
thanks!
NX 8.0.1.5