Jump to content

Bulk colour change


Mirkin

Recommended Posts

Hi all

We have a really weird system at our company where all lines in green on the drawings print out in red and everything else prints black (Don't ask me why!)

Anyway, a lot of the older drawings have lots of green stuff in them, and obviously when I want to plot them I have to change all the green to some other colour. This is particularly laborious when the green is text inside blocks.

Is there any way I can run a routine on the drawing, either before or after it has loaded, to make all the green into another colour?

It sounds tricky to me but it might be possible.

Cheers

Link to comment
Share on other sites

  • Replies 20
  • Created
  • Last Reply

Top Posters In This Topic

  • marmo

    6

  • Mirkin

    6

  • RobDraw

    5

  • BIGAL

    1

Top Posters In This Topic

Just have a look when plotting at your CTB file if you just do plot and accept "your" default ctb that is the problem, easy fix just click on edit, top right, and reset the colours say back to defualt then save it as a different name. We have 1-9 as blacks the 10-250 as the actual colour the 251-254 as greys.

Link to comment
Share on other sites

BIGAL what you say makes perfect sense.

Sadly the bloke I work with wouldn't be able to cope with the confusion.

We would have to have a ctb file for the new drawings and a different one for the old ones. I have no idea why it's set up how it is or why he changed his mind at some point to make green print red but it's not making my life very easy at all!

Link to comment
Share on other sites

We would have to have a ctb file for the new drawings and a different one for the old ones

 

That is the way it should be done. When changes are made to the .ctb, either the old .ctb needs to stay in place for legacy drawings or the drawings need to be changed. It was poor planning on the part of the person making the change.

 

As to making the changes, There are a couple of things that might help you. Change the layers that are green to another color. This will be all you need to do, if there aren't any overrides. The SETBYLAYER command will help for overrides. Any global changes will have to be analyzed to make sure anything undesirable doesn't happen.

 

If we could see a sample drawing, we could be of more assistance.

Link to comment
Share on other sites

Hi Rob

Can you take a look at this drawing please and let me know what you think.

I just want a quick easy way to turn all the green to black/white.

I don't think it will be possible.

And yes it was very bad planning!!!

Chris

15610-01.dwg

Link to comment
Share on other sites

TBH, I have much disdain for drawings like that. Everything is on layer "0".

 

I'm sorry I cannot be of much help without suggesting that you adopt totally new standards.

Link to comment
Share on other sites

Eeewww, they all have individual object properties, even some of the whites, and some are block attributes. It will take nearly a half hour or more to manually ferret out the changes for just one of these drawings. Sounds like a lisp is needed. If every thing was by layer, on a different layer, it would take mere seconds to do it manually, once the drawing was opened. I'm thinking whoever wants the color changes needs to re-think this one. Most probably, that person is the one who originally drew this mess, but now sitting in the "good chair".

Link to comment
Share on other sites

Cant you just select monochrome.ctb and print everything in black and white?

 

Color and linetype overrides are not good practice, that's what the layer property manger is for.

 

Gazza

Link to comment
Share on other sites

Haha you guys can see the predicament I'm in.

My boss is pretty old school and computers aren't really his thing. I've only been at my company 3 months and everything he does is as random as this.

I've taken the "easy" option and created a new ctb file that will print the old drawings out in monochrome except for a new shade of green that will come out as red. It's easier to change a few lines than all those blocks.

What a nightmare!

Link to comment
Share on other sites

There is a routine, type on search XCOLOR or COLORX I don't remember.

This routine has effects even with nested blocks.

Maybe it don't work with Mline...

Link to comment
Share on other sites

Hi Rob

Can you take a look at this drawing please and let me know what you think.

I just want a quick easy way to turn all the green to black/white.

I don't think it will be possible.

And yes it was very bad planning!!!

Chris

 

Ok i understand the issue...

 

This is my collection of routines for these cases.

I hope it will be useful

ATB_all to by layer.LSP

COLORX.lsp

FIXBLOCK.LSP

fixblocks.lsp

gcc.lsp

norm_to fix block.lsp

ssfilter-by-color.LSP

Edited by marmo
Link to comment
Share on other sites

Ive seen your drawing, maybe try first gcc.lsp for lines and fixblocks.lsp for blocks.

But pay attention cause fixblocks will change even the layer (it puts all nested objects on layer0 and colored by block).

 

If fixblock is not good for you because you don't want to change even the layer, try to:

 

1) select all blocks you want change using quick selcet or a routine.

2) copy and paste them in a new file (maybe paste at the same coordinates).

3) use colorx in the new file with your blocks (it will change only colours)

4) purge those blocks in the main file (you have to eliminate them from the database, its impiortant!)

5) paste the modified blocks from new file to the main file at the same coordinates.

Edited by marmo
Link to comment
Share on other sites

Hi all

We have a really weird system at our company where all lines in green on the drawings print out in red and everything else prints black (Don't ask me why!)

Anyway, a lot of the older drawings have lots of green stuff in them, and obviously when I want to plot them I have to change all the green to some other colour. This is particularly laborious when the green is text inside blocks.

Is there any way I can run a routine on the drawing, either before or after it has loaded, to make all the green into another colour?

It sounds tricky to me but it might be possible.

Cheers

all you need is to modify the ctb file, but if you incest you may use this lisp.

type: chac to change to color and type uu to undo all changes

change color.lsp

Link to comment
Share on other sites

Thanks for the Lisps guys.

I tried to run them but to be honest I'm a bit of a novice at this side of things.

I used the Appload command to try change colour and also fixblocks. AutoCAD said that they had loaded successfully but I have no idea how to make them work from there.

Can you give me some more detailed instructions please?

Link to comment
Share on other sites

Wait. Do you have any idea what they do or how they do it?

 

For instance, I see three for fixing blocks. What do they actually do?

 

Lacking that type of information and running the code could be disastrous to your drawing. Make sure to try them out on a copy of the file.

 

I'm sure marmo was well meaning but just throwing a bunch of unknown stuff at a drawing is probably not a good idea.

 

See this thread, http://www.cadtutor.net/forum/showthread.php?1390-How-to-use-the-LISP-routines-in-this-archive, for how to run LISP.

Edited by RobDraw
Link to comment
Share on other sites

Thanks for the Lisps guys.

I tried to run them but to be honest I'm a bit of a novice at this side of things.

I used the Appload command to try change colour and also fixblocks. AutoCAD said that they had loaded successfully but I have no idea how to make them work from there.

Can you give me some more detailed instructions please?

 

Whereas he requested eventually a lisp routine in his first post, we could suppose he is able to manage them.

However you're right when you say it could be disastrous using them without awareness.

Link to comment
Share on other sites

In my experience, that is not a fair assumption. I've seen countless people requesting code that don't know the first thing about it. For some reason, they think that because they don't know how to do something, they need some magical code to do the work for them.

 

After seeing the example file, I wouldn't make any assumptions about depth of knowledge of AutoCAD. The shotgun approach that you are suggesting is not valuable to the OP and could perpetuate the bad CAD that is already happening here.

 

If you could explain exactly what each code does and how it does it, that would allow the OP to evaluate if it suits his needs and possibly teach him something at the same time.

Link to comment
Share on other sites

I'm not arguing. It's just friendly advice for both of you and you are not heeding my advice.

 

You really shouldn't blindly run LISPs, unless you know exactly what they do or you trust the source.

Link to comment
Share on other sites

For example load colorx in a sample dwg and type colorx on prompt (it will change all colors in this dwg, all entities with the same color, even nested objects).

Use it with the strategy I've posted in #12:

1 select the entities you want change in the main file with Quick select,

2 cut them from the original dwg and paste them in a new dwg,

3 then change their color with colorx (maybe use bylayer color).

4 paste them in the main file

For blocks pay attention, because you've to purge them before pasting.

 

If you want how it works exactly this code, type colorx on search of this forum, it was edited by a member.

Edited by marmo
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...