Author Topic: Automation Error. Invalid argument color in IAcadEntity::put_Color  (Read 222 times)

0 Members and 1 Guest are viewing this topic.

mailmaverick

  • Bull Frog
  • Posts: 365
Whien I use (vla-put-color obj 1) I get following error :-


Automation Error. Invalid argument color in IAcadEntity::put_Color

Please help.

kdub

  • SuperMod
  • Swamp Rat
  • Posts: 966
  • class keyThumper<T>:ILazy<T>
Re: Automation Error. Invalid argument color in IAcadEntity::put_Color
« Reply #1 on: April 19, 2017, 07:07:25 am »
Please provide code and a drawing to demonstrate your issue.
called Kerry in my other life

Sometimes the question is more important than the answer.

mailmaverick

  • Bull Frog
  • Posts: 365
Re: Automation Error. Invalid argument color in IAcadEntity::put_Color
« Reply #2 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.

Master_Shake

  • Swamp Rat
  • Posts: 1254
Re: Automation Error. Invalid argument color in IAcadEntity::put_Color
« Reply #3 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.