Create DimStyles by Layer Color

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello to all.
I ask for help to the teachers.
I have the following layers in my drawings:
ELE -___-___-___- BIN -___- BIN_X1
ELE -___-___-___- BIN -___- BIN_X2
ELE -___-___-___- BIN -___- BIN_X3
ELE -___-___-___- BIN -___- BIN_X...
ELE -___-___-___- BIN -___- BIN_Y1
ELE -___-___-___- BIN -___- BIN_Y2
ELE -___-___-___- BIN -___- BIN_Y3
ELE -___-___-___- BIN -___- BIN_Y...
I need a routine to do a search in the layers table and create DIMSTYLEs, where the colors properties are the same color of each layer found.
DimStyles names: X1, X2, X3, ...., Y1, Y2, Y3, ....
Example:
If the color of the layer "ELE-___-___- BIN -___- BIN_X1" = 1
DimStyle X1 will have the properties ("dimclrd" 1.) ("dimclre" 1.) ("dimclrt" 1.)
If the color of the layer "ELE-___-___- BIN -___- BIN_X2" = 50
DimStyle X2 will have the properties ("dimclrd" 50.) ("dimclre" 50.) ("dimclrt" 50.)
Can anyone help me?
Thanks in advance.