PDA

View Full Version : Solved: AutoCAD 2004 - Color Control



malik641
06-23-2006, 07:43 PM
Hey Guys,

With the following code I can change the current layer's color:

Sub TestChangeLayerColor()
ThisDrawing.ActiveLayer.color = acBlue
End Sub
Very simple.

But let's say I don't want to change EVERY entity that is on that layer to the color blue....how do I change the color in the "Color Control" drop-down box to a different color? I can't find it anywhere??!!

malik641
06-27-2006, 05:55 AM
No suggestions?

I found some stuff on the AcadAcCmColor...and it seems to change the object's colors....but how can I get it to change the color control?

I also looked into toolbars and possibly modifying the toolbars via code...but no luck, mostly read-only stuff :mkay


Grrrrr :banghead: This is aggrevating. I'll keep searching.

malik641
06-28-2006, 05:16 PM
ThisDrawing.SendCommand "-color" & vbCr & "ByLayer" & vbCr

marking it solved.

lucas
06-28-2006, 05:39 PM
I never had a chance to look at this joseph. Glad you got it handled.

malik641
06-28-2006, 06:07 PM
It's all good. It was just so annoying because there was nothing in the Developer help on it (or in my AutoCAD vba book).