Im Back! but with error :)-GetOLEColorValue

Started by Slavko.Ivanovic · 2010-09-30 19:22 UTC · 2 replies · SMF topic #1345


First of all, hi to all OpenDCL developers and users.
In December 2009 i was change company (work place).
Iv got a much better position in my new company, but also much responsibilities.
I didn't touch any code from then up to two weeks ago.

In December 2009 i was also cooking some very interesting code for Show and Tell with intention
to post as a NEW YEAR present :), but i was forced to stop at 80%.

Now, to bug:
I was doing some stuff with colors and found this with 6.0.0.29 and 6.0.1.1

GetOLEColorValue ERROR:

(dcl_GetOLEColorValue (list 219 232 204)) -> 13428955
(dcl_GetOLEColorValue (list 220 232 204)) -> error !  from RED 220
...
...
(dcl_GetOLEColorValue (list 225 232 204)) -> error !
(dcl_GetOLEColorValue (list 227 232 204)) -> error !
...
...
(dcl_GetOLEColorValue (list 239 232 204)) -> error !  to RED 239
(dcl_GetOLEColorValue (list 240 232 204)) -> 13428976


i need confirmation.
thanx


Welcome back! The error is due to a bug in the way AutoCAD interprets DXF groups. The usual solution is to force one of the numbers to be a (float):
(dcl_GetOLEColorValue (list 220.0 232 204))
Thanks Owen.
Simple.
Next time i will investigate more before posting  ;).