Jump to content
misskiti

How to convert layer colour properties on multiple drawings quickly?

Recommended Posts

misskiti

Hi all,

 

I have 4500 OS mapping tiles which i need to convert the colours to one single colour rather than the varied layer colours they have at present. Obvioulsy doing this manually will take a long time. Is there a quicker way of doing this?

 

Many thanks for your help.

 

K

Share this post


Link to post
Share on other sites
eldon

All the OS mapping that I get has layers all coloured White, and all the linework has colours not BYLAYER. :shock:

Share this post


Link to post
Share on other sites
ReMark

It sounds like a job for a batch processing script file. The script would open the drawing, make the layer colour changes, save and close the drawing then continue to repeat the process until all drawings have been processed.

Edited by ReMark

Share this post


Link to post
Share on other sites
misskiti

Ok thanks ReMark... I have seen a programme called ScriptPro mentioned elsewhere though i've not got admin rights so can't install that without authorisation from our lovely IT department. I don't have any experience of using scripts so was hoping this is something others may have come across before :unsure:

Share this post


Link to post
Share on other sites
ReMark

Yes, there is the free ScriptPro available from AutoDesk.

 

Another option: Script Writer by CADTutor member Lee Mac available via the link below.

 

http://lee-mac.com/scriptwriter.html

 

Lee has also been kind enough to create a tutorial called "An Introduction to Script Writing" that is referenced on the same page.

Share this post


Link to post
Share on other sites
ReMark

A simple example of a script. This one opens a drawing named chglaytest located on drive C:, executes a zoom > all, invokes the layer command, changes the layer color to 2 (yellow) for all (*) layers. It then saves the drawing and closes it.

 

_open

C:\chglaytest.dwg

_zoom a

_layer

C

2

*

 

save

 

Y

close

Share this post


Link to post
Share on other sites
misskiti

Thanks very much for the info, I'll investigate further

Share this post


Link to post
Share on other sites
misskiti

Hi again,

 

I have run the above script and it works, thanks for your help.

 

However i have two issues now: the first is that it seems there are a few blocks contained within the drawings which the script does not change. Is there a way of writing something into the script to also change the colour of these?

 

The second is that the above script requires each drawing to be opened within autocad for the changes to be made. As i am on a very old machine this is going to take a very long time (i calculated about 45hours based on the test i did!) I have read elsewhere that there is a way of running scripts on drawings without them being opened in the drawing editor, and that this is much quicker. Does anyone know how to do this?

 

Thanks again for your help.

 

K

Share this post


Link to post
Share on other sites
ReMark

Sounds like you would have to incorporate a custom lisp program as well.

Share this post


Link to post
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
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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...