on 03-30-2007 8:23 PM
I have an attribute with the Attribute Detail set to:
Numeric
Ratings = Normal
Dimension=Length
Default Unit=inches
decimal places=2
Show Fractions=true
When i retrieve this attribute through the API, I get the full number of decimals returned instead of the 2 that is set in the Attribute detail. Any idea why?
Yes, there should be a seperate forum for API related questions.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am sorry, I am using version 5.5 SP3. Those objects do not seem to be part of this version. Would you have any suggestions for the version.
Thank you for your reply.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
The GetString function I mentioned was for the Java MDM4J API. However, a similar function exists in the COM API and has been around since the earliest days of the API.
The function is called <b>GetString</b> and exists in the <b>CharacteristicValue</b> class. Its signature is:
String GetString ( int DimensionID , int DecimalPlaces , boolean AllowFractions , int ConvertToUnitID )
If you are not interested in converting the Unit, set <i>ConvertToUnitID</i> to -1. The other values can be obtained from the <b>Attribute</b> class.
Walter
Hi,
Assuming you are using the MDM4J API, use the <b>MeasurementManger.GetString()</b> function to get formatted strings for attributes. Use the <b>AttributeInfo.GetXxx()</b> functions to supply the various parameters (eg. dimension, decimal places, etc.).
Walter
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
24 | |
11 | |
9 | |
7 | |
5 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.