Bug? SUTypedValueGetDouble => SU_ERROR_NO_DATA


#1
Ruby Console:
modeldict = Sketchup.active_model.attribute_dictionary "GlaserSectionToolX", true
#<Sketchup::AttributeDictionary:0x0000000b463510>
section = modeldict["A-A"]
[1, [0, 189.71779506668338, 0], [0, 366.4931280844982, 0], false]
section[1][0].class
Fixnum
section[1][1].class
Length

C++:
SUTypedValueType type = SUTypedValueType_Empty;
SU_CALL(SUTypedValueGetType(v1Values[i], &type)); // returns 5 => Double! Wrong Type?
double testdouble = 0;
SU_CALL(SUTypedValueGetDouble(v1Values[i], &testdouble)); //=> SU_ERROR_NO_DATA. Because is "Lenght", not "Double"

Solution: http://www.sketchup.com/intl/en/developer/docs/ourdoc/length#to_f
It is not possible to get value, if it is stored as Lenght-object in Dictionary?


#2

It seems you found a bug in the C API layer. Thank you for reporting! I’ll log it and we’ll try to get it fixed soon.
The only workaround I can see, unfortunately, is to store the value in the dictionary as a floating point number and not as a Length.


#3

It’s not a Problem for me store data as float. Bigger problem was for me to finding out why i can not get the value.
Thanks.


#4

Yes, sorry. It’s our fault and we’ll fix it.