• progeCAD in French Language
  • progeCAD in Spanish Language
  • progeCAD in English Language
Home > Support > Vba API > Visual Basic Reference > Reference Guide > Properties > Color Property 

Color Property

Color Property

Color property

Sets or returns the color of an entity.

Colors can be set and read as numeric index values ranging from 0 to 256. For the standard seven colors and the ByBlock and ByLayer designations, you can also use constants shown below. The default color designation is ByLayer (0).

Syntax

integerVariable = object.Color

object.Color = <integer>

 

where:

     integerVariable is a variable for storing the color index value.

     object is the entity object for which you set or return the color.

Colors Constant Index Value

VicBlue

5

VicByBlock

0

VicByLayer

256

vicBy ColorXOr

1

vicCyan

4

vicGreen

3

vicMagenta

6

vicRed

1

vicVarious

-2

vicWhite

7

vicYellow

2

Color property example

 
DWG is the native file format for Autodesk AutoCAD®. Autodesk and AutoCAD are registered trademarks or trademarks of Autodesk, Inc. in the USA and/or other countries. progeSOFT and progeCAD are registered trademarks or trademarks of progeCAD s.r.l. in the USA and/or other countries.