The Hurricane Forum
The Hurricane Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Hurricane for AutoCAD
 General Discussion
 Change White Layers to Red

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

   Attach a File

Check here to subscribe to this topic.
   

T O P I C    R E V I E W
advcad Posted - July 01 2006 : 12:09:32 PM
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.
5   L A T E S T    R E P L I E S    (Newest First)
advcad Posted - July 04 2006 : 08:47:21 AM
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.
n/a Posted - July 03 2006 : 4:12:09 PM
(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
advcad Posted - July 03 2006 : 2:49:50 PM
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
n/a Posted - July 03 2006 : 1:41:05 PM
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?
n/a Posted - July 03 2006 : 1:17:46 PM
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.

The Hurricane Forum © 2009 - 2021 Go To Top Of Page
This page was generated in 0.03 seconds. Snitz Forums 2000