| Author |
Message |
CADMAN33619
Joined: 21 Jul 2009
Posts: 23
|
Posted:
Fri May 07, 2010 2:24 pm Post subject:
can i add a color to the SELECT COLOR dialog? |
|
|
Hi all,
i have a specific RGB color i use very often (138,138,138) and i'm tired of going into the Select Color dialog>True Color tab and moving the slider up/down until i land on the color /numbers i need.
Is there a way to have this color "set" somewhere so that i can just select it when i need to change an item (or multiple items) to that color?
Thanks
cadman33619
_________________ cadman33619
http://www.k2engineering.com |
|
| Back to top |
|
 |
CarlB
Joined: 27 Sep 2005
Posts: 121
|
Posted:
Fri May 07, 2010 8:44 pm Post subject:
|
|
|
I don't think you can set it somewherere..easily.
You can shortcut it a bit by using the "-color" command (note hyphen"), then "truecolor" option then type in "138,138,138".
if you often change objects to just this color (makes me wonder why you don't accomplish this "bylayer") you could have a lisp routine that starts with the command "138" that would prompt you to select objects which would then automatically (programatically) be changed to 138,138,138. |
|
| Back to top |
|
 |
CADMAN33619
Joined: 21 Jul 2009
Posts: 23
|
Posted:
Mon May 10, 2010 1:36 pm Post subject:
|
|
|
Hi Carl,
not sure what you mean by accomplishing this "bylayer".
what I usually do is this...
after recieving a survey I go thru and change items that I want to fade back or screen to color 138,138,138. I do this thru the layer properties manager. I click on the color of a layer which brings up the Select Color dialog. on the color line I select color * (because it is the closest to the color i need) then select the True Color tab and adjust the slider to 138,138,138.
Am I doing this the long way? Is there an easier way to change an Item or layer to the color I need?
After doing this for so long I gotta believe there is an easier way. I'm sure a lisp would help but I wouldn't know how to create one.
Thanks _________________ cadman33619
http://www.k2engineering.com |
|
| Back to top |
|
 |
CarlB
Joined: 27 Sep 2005
Posts: 121
|
Posted:
Mon May 10, 2010 8:17 pm Post subject:
|
|
|
OK I see you are changing layer colors, not object colors. This is good, is what I meant by objects having a color "bylayer".
OK a shorthand way to change layer colors is to use the "-la" or "-layer" command (on the command line) rather than the layer manager dialogue box.
When prompted for color type "t" then "138,138,138" then type the layer name, or names (using names separated by commas or with wildcard characters) to change to that color.
A lisp could make this a little easier. If it's not easy to know or type layer names, a lisp could allow you to pick objects and the layer of that object would be changed. If interested let me know how you'd like it to work, if it doesn't get complex I could write some code. |
|
| Back to top |
|
 |
CADMAN33619
Joined: 21 Jul 2009
Posts: 23
|
Posted:
Mon May 10, 2010 8:46 pm Post subject:
|
|
|
Thanks Carl,
I tried it your way a few times....but I gotta say I find it more complicated. Its taking me longer to look for the layers and type in the names. Theres a bit more back-and-forth when doing it that way.
I would love to have a lisp that would ask me to select an object, then ask me for the new color of the layer for that object...i could then type in my color (numbers). This would be ideal because I have a few different plot styles set up for different plotters/11x17 printers. (138 works for plotter but i have to change it to 8 for printer).
Would that be possible? _________________ cadman33619
http://www.k2engineering.com |
|
| Back to top |
|
 |
CarlB
Joined: 27 Sep 2005
Posts: 121
|
Posted:
Mon May 10, 2010 10:22 pm Post subject:
|
|
|
Sure can, here's a simple routine to change layer color of selected object.
If you're not familiar with lisps; copy and paste the code to a blank notepad file (or other text editor), save it with any name and an ".lsp" extension. For example I caled it "Change_Layer_Color.lsp"
Load it from Autocad with the "appload" command.
Type "layco" to run it.
| Code: | (princ "Type LAYCO to start")
(defun c:layco ()
(initget 1)
(setq NewColor (getstring "\nEnter truecolor to apply to selected layers: "))
(while (setq PickObj (entsel (strcat "\nPick object to changelayer color to " NewColor ": ")))
(setq Ename (car PickObj))
(setq ObjLayer (cdr (assoc 8 (entget Ename))))
(command "_-layer" "_C" "_T" NewColor ObjLayer "")
)
(princ)
) |
|
|
| Back to top |
|
 |
CADMAN33619
Joined: 21 Jul 2009
Posts: 23
|
Posted:
Tue May 11, 2010 2:18 pm Post subject:
|
|
|
Carl,
this works perfectly. Exactly what I needed and saves so much time. I don't know how to thank you. Once I get used to the true color values for the other basic colors I use this will be even more helpful.
cadman _________________ cadman33619
http://www.k2engineering.com |
|
| Back to top |
|
 |
CarlB
Joined: 27 Sep 2005
Posts: 121
|
Posted:
Tue May 11, 2010 5:41 pm Post subject:
|
|
|
Glad it helps, you've thanked me enough for this little exercise.
There probably is a guide/translator out there for a true color (RGB) to standard color but I didn't find it in a quick search. |
|
| Back to top |
|
 |
|
|
|
|