Color change of all dimension styles

Color change of all dimension styles

k005
Advisor Advisor
287 Views
3 Replies
Message 1 of 4

Color change of all dimension styles

k005
Advisor
Advisor

Hello friends


How can we automatically change the text color of the dimension styles in a dwg file to be 30, the color of the dimension line, symbols and arrows to be 9?


Thanks in advance for the help friend.

0 Likes
Accepted solutions (1)
288 Views
3 Replies
Replies (3)
Message 2 of 4

ВeekeeCZ
Consultant
Consultant
Accepted solution

Possibly like this

 

(defun c:DimstyleColors ( / d e)
  (while (setq d (tblnext "DIMSTYLE" (null d)))
    (setq e (tblobjname "DIMSTYLE" (cdr (assoc 2 d))))
    (setpropertyvalue e "DIMCLRT" 30)
    (setpropertyvalue e "DIMCLRD" 9)
    (setpropertyvalue e "DIMCLRE" 9))
  (command "_.-DIMSTYLE" "_Restore" (getvar 'dimstyle))
  (princ)
  )
Message 3 of 4

k005
Advisor
Advisor

@ВeekeeCZ 

 

In one word, Super. ! , Thank you very much. Ok. 🤗

0 Likes
Message 4 of 4

k005
Advisor
Advisor

This file did not work. What change should we make?

 

 

0 Likes