jmarkus
Mechanical
- Jul 11, 2001
- 377
Okay, I've read many threads on related topics, but I haven't seen something that addresses the problem I am having.
I have a part attribute, defined as a real number (i.e. with decimals) and I want to display it in a note on a drawing. So I use:
and it displays the value as 999.999. That's good!
Now I try to automate some tasks and I assign the value to the attribute in a journal (reference from thread using:
Which correctly assigns the value (I verfied by adding a MsgBox to report the value).
Then I revise an existing note on a drawing to change the text from whatever was there before to:
using the DraftingNoteBuilder method.
but on my drawing I see 1000. It is as if the real value was converted to an integer value.
What I find even stranger, is now if I manually add a note to the drawing <W@MVALUE>, it still shows 1000, and the old manual note which was assigned to the same part attribute before I ran the journal (which is still <W@MVALUE> in the text) still shows 999.999
So how can the part attribute displayed on the drawing "format itself" differently when the notes are exactly the same...and as far as I know the annotation function has no settings to control decimal places which would explain the difference!?
I even tried manually adding a different part attribute also with a value of 999.999 in the same note, in the same way and side-by-side one shows 999.999 and one shows 1000!
[I know I can use the <X0.2 expression formatting, but this is a part attribute, not an expression and if I were to have to add an expression it would introduce additional complexity to the problem I am trying to address since the part attributes are already assigned in a certain way.]
Stumped as always.
Thanks,
Jeff
I have a part attribute, defined as a real number (i.e. with decimals) and I want to display it in a note on a drawing. So I use:
Code:
<W@MVALUE>
Now I try to automate some tasks and I assign the value to the attribute in a journal (reference from thread using:
Code:
Dim MVALUE As NXObject.AttributeInformation
MVALUE.Title = "MY_VALUE"
MVALUE.Type = NXObject.AttributeType.Real
MVALUE.RealValue = 999.999
workPart.SetUserAttribute(MVALUE), Update.Option.Now)
Then I revise an existing note on a drawing to change the text from whatever was there before to:
Code:
<W@MVALUE>
but on my drawing I see 1000. It is as if the real value was converted to an integer value.
What I find even stranger, is now if I manually add a note to the drawing <W@MVALUE>, it still shows 1000, and the old manual note which was assigned to the same part attribute before I ran the journal (which is still <W@MVALUE> in the text) still shows 999.999
So how can the part attribute displayed on the drawing "format itself" differently when the notes are exactly the same...and as far as I know the annotation function has no settings to control decimal places which would explain the difference!?
I even tried manually adding a different part attribute also with a value of 999.999 in the same note, in the same way and side-by-side one shows 999.999 and one shows 1000!
[I know I can use the <X0.2 expression formatting, but this is a part attribute, not an expression and if I were to have to add an expression it would introduce additional complexity to the problem I am trying to address since the part attributes are already assigned in a certain way.]
Stumped as always.
Thanks,
Jeff