- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Denunciar
Hi @Kent1Cooper , thanks for the advice and all your help, I just wanted to provide some details on how the code has worked out.
It works 99.9% of the time and it does it really smoothly, however I've ran into minor issues I probably should have mentioned from the beginning.
I will start with the least important and most rare of two issues. I was plotting my file to PDF and we have some text that is 99% of the time color white, this color will plot black but 1% of the time it's 255,255,255 which after researching is a truecolor instead of an index color. So I tried doing this:
(if (setq ss (ssget "_X" '((0 . "HATCH") (62 . 1)))); only red Hatch object(s)
(command "_.ChProp" ss "" "_C" "ByLayer" ""))
(if (setq ss (ssget "_X" '((0 . "*LINE") (62 . 3)))); only green Line/Polyline object(s)
(command "_.ChProp" ss "" "_C" 82 ""))
(if (setq sstext (ssget "_X" '((0 . "TEXT") (255,255,255)))); 255 text to color 7
(command "_.ChProp" ss "" "_C" 7 ""))
Evidently the blue portion is mine and doesn't work basically I found out I could not get color 255 to plot so it was white text with white background.
The other and more frequent issue that I forgot at the beginning was that we have some files with a title on color yellow (2) and this title is a block entity with attributes the layer is magenta but the attribute is color (2) I need a similir routine that changes all "Block " "Text" "Attributes" from color 2 to color 52.
I found this code researching this forum and found:
(defun C:ATTEC (/ ss) ;Attribute Edit Color
(command "_-attedit" "_y" "" "" "" PAUSE "" "_c" PAUSE "_n")
(princ)
)
BTW Credits to @ВeekeeCZ
Which is exactly what I need but same as we started requires user input and I want to automate the process, would you know how I can accomplish what I have tried to explain?
Any help will be very much appreciated.
Thanks,
Victor P.