See the top rated post in this thread. Click here

Page 2 of 2 FirstFirst 12
Results 11 to 15 of 15

Thread: AutoCAD Color Index and RGB

  1. #11
    Certified AUGI Addict jaberwok's Avatar
    Join Date
    2000-12
    Location
    0,0,0 The Origin
    Posts
    8,570
    Login to Give a bone
    0

    Default Re: AutoCAD Color Index and RGB

    Quote Originally Posted by Ed Jobe
    Just curious, why are you needing the conversion info? I havn't found a need for it in the work I do.

    Kris ?

  2. #12
    100 Club Kris.Keller's Avatar
    Join Date
    2000-12
    Location
    Rigby, Idaho
    Posts
    106
    Login to Give a bone
    0

    Default Re: AutoCAD Color Index and RGB

    Quote Originally Posted by Ed Jobe
    Just curious, why are you needing the conversion info? I havn't found a need for it in the work I do.
    We have a user that is using AutoCAD and a civil package. He wants to set his civil package to have the same look and feel as AutoCAD as far as line types, and colors. He can assign his layers to same as AutoCAD but he needs to do it by RGB. He went through this a couple of years ago. He just received a new computer and lost all of his settings and is just trying to get back to where he was. I for one love getting new computers but I hate setting everything up the way I had the old one.

    Have a great day.

  3. #13
    Administrator Ed Jobe's Avatar
    Join Date
    2000-11
    Location
    Turlock, CA
    Posts
    6,419
    Login to Give a bone
    0

    Default Re: AutoCAD Color Index and RGB

    So your need is 3rd-party driven. The thread I pointed to should have what you need. Not very clean, but you only have to do it once...theoretically that is.
    C:> ED WORKING....


    LinkedIn

  4. #14
    Woo! Hoo! my 1st post
    Join Date
    2013-02
    Posts
    1
    Login to Give a bone
    0

    Default Re: AutoCAD Color Index and RGB

    My blog may help:



    It's an excel file with the conversions.

  5. #15
    All AUGI, all the time arshiel88's Avatar
    Join Date
    2005-02
    Location
    Off the Grid
    Posts
    560
    Login to Give a bone
    1

    Default Re: AutoCAD Color Index and RGB

    Here is an excel table with ACI colors converted to RGB values. (check attached file.)

    I got it converted by this code.
    Code:
    Sub ACItoRGBValues()
    
    MajorVerNumber = Left(ThisDrawing.GetVariable("ACADVER"), 2)
    Dim color As AcadAcCmColor
    Set color = AcadApplication.GetInterfaceObject("AutoCAD.AcCmColor." & MajorVerNumber)
    
    Open "C:\ACItoRGB.csv" For Output As #1
    
    Print #1, "ACI" & "," & "ColorName" & "," & "R" & "," & "G" & "," & "B"
      
    For i = 0 To 256
        color.ColorIndex = i
        Print #1, i & "," & color.ColorName & "," & color.Red & "," & color.Green & "," & color.Blue
    Next
    Close #1
    
    End Sub

    ...and added the colors in excel by this.

    Code:
    Sub Macro1()
    For i = 2 To 258
        With Range("F" & i).Interior
            .Pattern = xlSolid
            .PatternColorIndex = xlAutomatic
            .Color = RGB(Range("B" & i).Value, Range("C" & i).Value, Range("D" & i).Value)
            .TintAndShade = 0
            .PatternTintAndShade = 0
        End With
    Next
    End Sub

    Edit: I didn't check the link posted above before I post but its basically the same output. cheers!
    Attached Files Attached Files
    Last edited by arshiel88; 2013-02-06 at 07:38 AM.

Page 2 of 2 FirstFirst 12

Similar Threads

  1. AutoCAD Color Index (ACI) with RGB Equivalents
    By mooker16 in forum AutoCAD Civil 3D - General
    Replies: 3
    Last Post: 2020-03-06, 03:08 PM
  2. 2015: Need To Change A Color In The Color Index.
    By omorah in forum AutoCAD General
    Replies: 2
    Last Post: 2014-08-04, 11:43 AM
  3. AutoCAD Color Index: Index Color List
    By GreenMan415 in forum AutoCAD General
    Replies: 7
    Last Post: 2008-06-25, 05:36 AM
  4. autcad Color Index messed up
    By rjairath in forum AutoCAD General
    Replies: 6
    Last Post: 2008-02-25, 08:15 PM
  5. Index Color to RGB
    By bweir in forum Dot Net API
    Replies: 6
    Last Post: 2007-02-11, 01:43 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •