Author Topic: Color 255  (Read 9490 times)

0 Members and 1 Guest are viewing this topic.

hmspe

  • Bull Frog
  • Posts: 362
Color 255
« on: September 12, 2006, 04:37:00 PM »
Casting about for ideas....  We have color 255 set to 0% screening, and it's used for things like plotting margins (we have to have entities just inside the extents to get things centered on our plotter).  Anyway, colors 7 and 255 look identical on the screen (we use a black background, so both are white).  Not a problem for what we do in-house, but we have clients who have reassigned 255, and have had jobs go out recently where the building outlines that looked right on the screen were'nt of the plots we delivered.  I'm looking for ideas on how to differentiate between the two on the screen.

At this point I'm running this:

Code: [Select]
(defun fix_non_print ( / sset)
  (setq sset (ssget "x" '((62 . 255))))
  (if sset
    (command "_.chprop" sset "" "Color" "246" "") 
  )
  (princ)
)

as part of my start-up suite, but it's rather limited.  We've re-set color 246 to 0% screening, but I'm finding that some of our clients are using 246 for things that should print. 

What I'd really like is for color 255 entities to be something really unique, maybe like what you'd have iy you drew a dashed yellow line on top of a red line to get alternating yellow and red, but anything that would differentiate colors 7 and 255 on the screen would be OK.  I'd appreciate any thoughts, suggestions on how best to aproach this, code if someone else has already done this and would like to share, etc.

Thanks,
Martin     
"Science is the belief in the ignorance of experts." - Richard Feynman

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Color 255
« Reply #1 on: September 12, 2006, 04:55:52 PM »
Do you use xrefs?  Are you printing from paper space? or model?
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

hmspe

  • Bull Frog
  • Posts: 362
Re: Color 255
« Reply #2 on: September 12, 2006, 07:44:46 PM »
Do you use xrefs?  Are you printing from paper space? or model?
Our standard is model space only, one drawing per sheet, SDI interface. 

Works well for what we do (building electrical).  For those who may wonder why:  1) The files are small, so they load quickly.  2) All our devices are tied to walls.  We found that the time it took to clean up and overlay a new background in a different color from the existing [which highlights the wall changes very well] was a lot less than doing a space-by-space review trying to see what had changed in an xref.  3)  We work with a couple dozen architects, each of which has their own standards.  Getting everything into our standard speeds up our work.  4) We deliver sealed paper copies, never DWG files, so there's no issue with "round-tripping" data.  5) About the 10th time I did a "close all" after being interrupted by a phone call, throwing out the morning's work in addition to the file I opened to answer the caller's question, I decided SDI had a lot of value.

Martin   
"Science is the belief in the ignorance of experts." - Richard Feynman

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Color 255
« Reply #3 on: September 13, 2006, 11:14:00 AM »
If you never send dwg files, then what is the problem?  I guess I'm not fully understand what is happening, and what you want to change.  If seems that you want to change the color of what you use to mark margins on your files so they print right, but when you sent out the drawings, they didn't print right.... I'm a little lost.  Am I close?
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

Greg B

  • Seagull
  • Posts: 12417
  • Tell me a Joke!
Re: Color 255
« Reply #4 on: September 13, 2006, 12:43:56 PM »
His problem is that other companies they get the drawings from use the same colors as part of their drawings so that when he tries to print it, it won't print because they have it set up as a no plot color.

hmspe

  • Bull Frog
  • Posts: 362
Re: Color 255
« Reply #5 on: September 13, 2006, 02:24:16 PM »
If you never send dwg files, then what is the problem?  I guess I'm not fully understand what is happening, and what you want to change.  If seems that you want to change the color of what you use to mark margins on your files so they print right, but when you sent out the drawings, they didn't print right.... I'm a little lost.  Am I close?

As Greg said, we get drawings from architects that use color 255 as a printing color.  Our office sets 255 to "no print".  Since both color 7 and color 255 are white on the screen it's not obvious what will print and what will not.  Most of the time we catch this with either plot preview or when we review the actual plots, but not always.  Sometimes it's little stuff in details or blocks that are not obvious until we start getting calls from contractors, but we've had cases where building outlines didn't print and cases where very necessary notes didn't print.  These items were white on the screen, so we assumed they would print as black lines.  When we're on deadline final plots don't always get checked as thoroughly as we'd like.

What I'm trying to do is flag anything that's color 255 on the screen in a very obvious way.  If we can differentiate color 255 from white on the screen we can do a better job of making sure that what's supposed to print does, and what's not supposed to printy does not print.  Just changing entities that are color 255 to some other color doesn't work because there's no color that's readily visible that isn't used by our clients, and even if there was an unused color it would be difficult use (for example) blue unless we also take out 150, 160, 170, 180, etc., because the shades of blue are too close to color 5.  That's why the thought of a multi-color line.  Flashing would work, but it would probably be so distracting as to be unusable.  Highlighting might work (we don't use roll-over highlighting).  I'm open to other suggestions, and would appreciate any help or direction -- I'm thinking this is reactor territory, and I don't know much about reactors.

Thanks,
Martin
"Science is the belief in the ignorance of experts." - Richard Feynman

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Color 255
« Reply #6 on: September 13, 2006, 03:15:01 PM »
Okay, I think I got it now.  I would put your items on a certain layer, and make sure not to change anything that is one that layer.  Then step through the layer collection, and find all the layers (that are not yours) and color 255, and change them to a printing color.  If the objects are not drawn by layer, then you will have to search the whole drawing or objects that are assigned to color 255, remember to check nested objects also.  Does this sound like it will work for you?
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

Greg B

  • Seagull
  • Posts: 12417
  • Tell me a Joke!
Re: Color 255
« Reply #7 on: September 13, 2006, 03:31:19 PM »
Does color 255 HAVE to be white?  or can you edit the color?

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Color 255
« Reply #8 on: September 13, 2006, 03:33:47 PM »
Does color 255 HAVE to be white?  or can you edit the color?
In AutoCAD the colors are predefined.  You can change layers to different colors, but the colors are set.  You have 1- 255.

Edit:  I guess you could use RGB type colors, but I have not tried that yet.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

Hangman

  • Swamp Rat
  • Posts: 566
Re: Color 255
« Reply #9 on: September 13, 2006, 04:17:43 PM »
So, ... just a guestimation here, you're looking for a piece of code that will do a search by QSelect (as one does) for a color = 255.  Then either alert the user that there is a 255 in the drawing, or do a property change to something for whatever is color 255 ?.?  Is that about right ??
Hangman  8)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Drafting Board, Mechanical Arm, KOH-I-NOOR 0.7mm
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

hmspe

  • Bull Frog
  • Posts: 362
Re: Color 255
« Reply #10 on: September 13, 2006, 06:13:40 PM »
Okay, I think I got it now.  I would put your items on a certain layer, and make sure not to change anything that is one that layer.  Then step through the layer collection, and find all the layers (that are not yours) and color 255, and change them to a printing color.  If the objects are not drawn by layer, then you will have to search the whole drawing or objects that are assigned to color 255, remember to check nested objects also.  Does this sound like it will work for you?

Thanks for the suggestion.  That could work -- our color 255 entities are already on a dedicated layer.  Two concerns.  First, how could this be efficiently automated to be sure nothing is missed?  A lisp that runs at startup would not process a later block insertion.  That leaves using a reactor or redefining INSERT to check for color 255 after the insert.  Not sure how much overhead either would entail.  Maybe either a reactor or redefining the PLOT command to do a check just before plotting?  Again, overhead might be a problem.

Second, I'd really like to highlight the entities so that I have to manually deal with them rather than just change them automatically to a different color -- some architects we are working with are using 255 as printing, but some are not.  I guess it would be possible to move all the "foreign" color 255 entities to a dedicated layer for processing, but this brings up the automation question:  what's the best place to tie a routine for this in, and what's the best way to do it?  Time to think some more....

Martin 
"Science is the belief in the ignorance of experts." - Richard Feynman

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Color 255
« Reply #11 on: September 13, 2006, 06:22:42 PM »
I would say have a routine to do it.  Depend on how big your files are, it might take half a minute to a minute, or it could take 5 seconds or less.  I wouldn't put it in a reactor if you don't want it to run all the time.  It sounds like it would only need to be ran once per new drawing from the architects.  It wouldn't be to hard to code, but you would have to know what color you want to change it to.  I would do it in AcitveX, but that is just an opinion.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

hmspe

  • Bull Frog
  • Posts: 362
Re: Color 255
« Reply #12 on: September 13, 2006, 06:43:02 PM »
Does color 255 HAVE to be white?  or can you edit the color?
In AutoCAD the colors are predefined.  You can change layers to different colors, but the colors are set.  You have 1- 255.

Edit:  I guess you could use RGB type colors, but I have not tried that yet.

To add a thought:  I looked at this and didn't find a way to make it work.  It occurs to me that if there is a way to remap colors that a bright orange might be good (it would only conflict with color 30, and I rarely see color 30 used). 

Martin
"Science is the belief in the ignorance of experts." - Richard Feynman

hmspe

  • Bull Frog
  • Posts: 362
Re: Color 255
« Reply #13 on: September 13, 2006, 06:44:11 PM »
So, ... just a guestimation here, you're looking for a piece of code that will do a search by QSelect (as one does) for a color = 255.  Then either alert the user that there is a 255 in the drawing, or do a property change to something for whatever is color 255 ?.?  Is that about right ??

That's pretty much it.

Martin
"Science is the belief in the ignorance of experts." - Richard Feynman

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Color 255
« Reply #14 on: September 13, 2006, 06:56:23 PM »
Try this (in a test drawing)
Code: [Select]
(defun ChangeColor (Doc Old New LayList)

(vlax-for Lay (vla-get-Layers Doc)
 (if
  (and
   (not (vl-position (vla-get-Name Lay) LayList))
   (equal (vla-get-Color Lay) Old)
  )
  (vla-put-Color Lay New)
 )
)
(vlax-for Blk (vla-get-Blocks Doc)
 (if (= (vla-get-IsXref Blk) :vlax-false)
  (vlax-for Obj Blk
   (if (equal (vla-get-Color Obj) Old)
    (vla-put-Color Obj New)
   )
   (if (= (vla-get-ObjectName Obj) "AcDbBlockReference")
    (foreach Att (vlax-invoke Obj 'GetAttribute)
     (if (equal (vla-get-Color Att) Old)
      (vla-put-Color Att New)
     )
    )
   )
  )
)
)
Call like (for current drawing)
Code: [Select]
(ChangeColor (vla-get-ActiveDocument (vlax-get-Acad-Object)) 255 30 '("DontChange"))
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.