Im Back! but with error :)-GetOLEColorValue

Started by Slavko Ivanovic, September 30, 2010, 12:22:42 PM

Previous topic - Next topic

Slavko Ivanovic


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
Code (autolisp) Select

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


***  siCAD Solutions for AutoCAD  ***
ArchiTools l ToolsPlus l LandTools l LBE

owenwengerd

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):
Code (autolisp) Select
(dcl_GetOLEColorValue (list 220.0 232 204))
Owen Wengerd (Outside The Box) / ManuSoft

Slavko Ivanovic

Thanks Owen.
Simple.
Next time i will investigate more before posting  ;).
***  siCAD Solutions for AutoCAD  ***
ArchiTools l ToolsPlus l LandTools l LBE