TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: mailmaverick on April 19, 2017, 06:54:40 AM

Title: Automation Error. Invalid argument color in IAcadEntity::put_Color
Post by: mailmaverick on April 19, 2017, 06:54:40 AM
Whien I use (vla-put-color obj 1) I get following error :-


Automation Error. Invalid argument color in IAcadEntity::put_Color

Please help.
Title: Re: Automation Error. Invalid argument color in IAcadEntity::put_Color
Post by: kdub_nz on April 19, 2017, 07:07:25 AM
Please provide code and a drawing to demonstrate your issue.
Title: Re: Automation Error. Invalid argument color in IAcadEntity::put_Color
Post by: mailmaverick on April 19, 2017, 07:49:05 AM
Thanks kdub. Actually my color index was in a variable named 'colr' which had value > 255
I reduced its value, and the problem is solved.
Title: Re: Automation Error. Invalid argument color in IAcadEntity::put_Color
Post by: ChrisCarlson on April 19, 2017, 08:54:32 AM
Just an FYI, the snippet you posted had a color code of "1". For better results post the snippet including how you set each variable.