SetCellBackgroundColor

SetCellBackgroundColor

john.uhden
Mentor Mentor
367 Views
5 Replies
Message 1 of 6

SetCellBackgroundColor

john.uhden
Mentor
Mentor

Is there a way to use this method on an AutoCAD Table cell using an AutoCAD index color, like 254?

John F. Uhden

0 Likes
368 Views
5 Replies
Replies (5)
Message 2 of 6

paullimapa
Mentor
Mentor

you'll have to use the method to convert the aci to acCmColor like this example:

https://www.cadtutor.net/forum/topic/66724-how-do-you-fill-a-table-with-a-color/?do=findComment&comm...


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 3 of 6

komondormrex
Mentor
Mentor

check this

Set Table Cell Color 

0 Likes
Message 4 of 6

Sea-Haven
Mentor
Mentor

Maybe this

 

(setq acCol (vla-get-truecolor objtable))
(vla-put-colormethod acCol acColorMethodByACI)
(vla-put-colorindex acCol col)
(vla-setcellbackgroundcolornone objtable 1 0 :vlax-false)
(vla-setcellbackgroundcolor objtable 1 0 accol)
(vlax-release-object acCol)
0 Likes
Message 5 of 6

john.uhden
Mentor
Mentor

@Sea-Haven ,

I don't understand that mumbo jumbo.

Why didn't I think of this before?...

I'm gonna format one cell manually then apply its result to the targets.

(I hope it works.)

John F. Uhden

0 Likes
Message 6 of 6

Sea-Haven
Mentor
Mentor

Hi John should have posted row column example.

 

(vla-setcellbackgroundcolornone objtable row column :vlax-false)
(vla-setcellbackgroundcolor objtable row column accol)

 

0 Likes