The Hurricane Forum
The Hurricane Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Hurricane for AutoCAD
 General Discussion
 Change White Layers to Red
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

advcad
Starting Member

3 Posts

Posted - July 01 2006 :  12:09:32 PM  Show Profile  Visit advcad's Homepage  Reply with Quote
I'm a beginner with scripts. Haven't figured out how to have "all Layers with Color White", "Change to Red". Any help would be appreciated.

n/a
deleted

112 Posts

Posted - July 03 2006 :  1:17:46 PM  Show Profile  Reply with Quote
advcad

I think you are going to have to use Autolisp within your script to search the layer table for the default color. If you time to wait, I'll try to post something by tomorrow morning. If it's not there by then, it either proved too difficult for me, or I just did not have time to get to it. (I don't think it will be too difficult or time-consuming. I just can't get to it until after work today, though, for sure.

Steve Bubendorf
Go to Top of Page

n/a
deleted

112 Posts

Posted - July 03 2006 :  1:41:05 PM  Show Profile  Reply with Quote
Questions:
1.) Do you have known layers with white, or do they vary? If the white layers are known, can you please provide a list?
2.) Your question does deal with layers with white default (bylayer) color versus entities which were specifically designated to be drawn with a white color on a layer whose default color may have been something other than white, correct?

Steve Bubendorf
Go to Top of Page

advcad
Starting Member

3 Posts

Posted - July 03 2006 :  2:49:50 PM  Show Profile  Visit advcad's Homepage  Reply with Quote
quote:
Originally posted by sbubendorf

Questions:
1.) Do you have known layers with white, or do they vary? If the white layers are known, can you please provide a list?
2.) Your question does deal with layers with white default (bylayer) color versus entities which were specifically designated to be drawn with a white color on a layer whose default color may have been something other than white, correct?


1. Layers Vary
2. These are Layers with white default.
Thanks for responding
Go to Top of Page

n/a
deleted

112 Posts

Posted - July 03 2006 :  4:12:09 PM  Show Profile  Reply with Quote
(load "CLCWHITE2RED")
CLCWHITE2RED

The two lines above (exactly as shown, with parentheses & quotes) should be all you need in your script file in Hurricane.

Back up your drawing files to a second safe location before proceeding.

Unzip the attached file to the folder where your original drawings are, or to a folder in your AutoCAD path. Run the Hurricane script on your drawings. Hopefully you will get the results you are looking for. It seemed to work here, if I understood your situation correctly. It's a pretty basic lisp without any error checking and it was tested on basic, small files without Xrefs, so it's possible you could get different results than I did.

Please let me know whether or not it works for you. If it doesn't, I may be able to make some small modification that will make it run. (NO PROMISES !! )

Download Attachment: CLCWHITE2RED.zip
779 Bytes

Steve Bubendorf
Go to Top of Page

advcad
Starting Member

3 Posts

Posted - July 04 2006 :  08:47:21 AM  Show Profile  Visit advcad's Homepage  Reply with Quote
quote:
Originally posted by sbubendorf

(load "CLCWHITE2RED")
CLCWHITE2RED

The two lines above (exactly as shown, with parentheses & quotes) should be all you need in your script file in Hurricane.

Back up your drawing files to a second safe location before proceeding.

Unzip the attached file to the folder where your original drawings are, or to a folder in your AutoCAD path. Run the Hurricane script on your drawings. Hopefully you will get the results you are looking for. It seemed to work here, if I understood your situation correctly. It's a pretty basic lisp without any error checking and it was tested on basic, small files without Xrefs, so it's possible you could get different results than I did.

Please let me know whether or not it works for you. If it doesn't, I may be able to make some small modification that will make it run. (NO PROMISES !! )

Download Attachment: CLCWHITE2RED.zip
779 Bytes



Thank you for your response. The files I had to modify had xrefs. Perhaps that is why your script didn't quite work. Here is a script that "Jeff Mishler" from the AutoCad discussion group sent me that worked with the xrefs.
;BEGIN SCRIPT
(defun color->othercolor (old new / layer layent)
(while (setq layer (tblnext "LAYER" (not layer)))
(if (= (cdr (assoc 62 layer)) old)
(progn
(setq layent (entget (tblobjname "LAYER" (cdr (assoc 2 layer)))))
(entmod (subst (cons 62 new) (assoc 62 layent) layent))
)
)
)
)
(color->othercolor 7 1)

Again, thanks for reponding.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Hurricane Forum © 2009 - 2021 Go To Top Of Page
This page was generated in 0.05 seconds. Snitz Forums 2000