Author Topic: DIC Color  (Read 170 times)

0 Members and 1 Guest are viewing this topic.

mohan

  • Newt
  • Posts: 81
DIC Color
« on: June 28, 2022, 08:23:14 AM »
Code - Auto/Visual Lisp: [Select]
  1. (command "_CHPROP" "_L" "" "_C" "_T" "?????" "")

???? what i should type for the color DIC 9
"Save Energy"

kirby

  • Newt
  • Posts: 110
Re: DIC Color
« Reply #1 on: June 28, 2022, 09:26:13 AM »
You were almost there.  Try to do it manually on the command line.

Code - Auto/Visual Lisp: [Select]
  1. (command ".change" MyEnt "" "P" "C" "CO" "DIC COLOR GUIDE(R)" 9 "")
  2.  

The hardest part is finding out the color book name.  The named can be found the the xmlk <bookName> field in the .acb file.  Manually change the color of an object then query the DXF code, as follows.

Code - Auto/Visual Lisp: [Select]
  1. Entity data
  2.  (-1 . <Entity name: 23555858f60>)
  3.  (0 . LINE)
  4.  (330 . <Entity name: 235557e91f0>)
  5.  (5 . 69DE)
  6.  (100 . AcDbEntity)
  7.  (67 . 0)
  8.  (410 . Model)
  9.  (8 . 0)
  10.  (62 . 41)
  11.  (420 . 16113018)   *** True Color (RGB)
  12.  (430 . DIC COLOR GUIDE(R)$DIC 9)   *** Color Book and color ID
  13.  (100 . AcDbLine)
  14.  (10 4181.66 3840.88 0.0)
  15.  (11 4980.22 3476.59 0.0)
  16.  (210 0.0 0.0 1.0)
  17.  

The Color Book name is a little confusing and requires some trial and error, use 'DIC COLOR GUIDE(R)"  and omit the $DIC shortcut name from the end. Or just navigate to the color book location (C:\Program Files\Autodesk\AutoCAD 2018\Support\Color on my workstation), open the .XML color book files and inspect the name.

mohan

  • Newt
  • Posts: 81
Re: DIC Color
« Reply #2 on: June 28, 2022, 10:01:48 AM »
Thank you so much . . .  :smitten:
"Save Energy"