Author Topic: Color 255  (Read 9487 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.

Krushert

  • Seagull
  • Posts: 13679
  • FREE BEER Tomorrow!!
Re: Color 255
« Reply #15 on: September 13, 2006, 08:09:28 PM »
Tim and Martin,

I have a crazy thought. 

Martin, I think what you want is that you want to readily identify what objects that have a color 255 and differentiate these from others.  Am I right?

If that is the case Tim, search the data base for all objects set that information to a selection set (I think you did this) then feed that set data to the "Isolate objects" command.  The command will shut off all other objects and leave the just the 255s.  Then Martin can visually inspect and change as required.  Sometimes he will want to review stuff before changing and do so manually.  It sounds like he is working with too many Archies to have one-size-fits-all routine because over here, we extensively use color 30.  (Yes there is always one that has to be difficult.  :-)

Now to make it more useful, if that data could be remembered so Martin can Isolate and Un-Isolate (2 separate) commands as he is reviewing the 255s.  Because us Archies will have stuff scattered all over the place sometimes he will need to see the adjacent objects that are shut-off to see the 255s relation to those adjacent objects.  He can toggle until everything is change to his liking.

My two sent suggestion.


I + XI = X is true ...  ... if you change your perspective.

I no longer CAD or Model, I just hang out here picking up the empties beer cans

hmspe

  • Bull Frog
  • Posts: 362
Re: Color 255
« Reply #16 on: September 14, 2006, 11:01:44 AM »
Thanks for the suggestions.  Time to see what I can put together.

Martin

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

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Color 255
« Reply #17 on: September 14, 2006, 11:14:26 AM »
Thanks for the suggestions.  Time to see what I can put together.

Martin


Use the code I posted as a starting point, and then look at the visibility property.  It isn't too hard to do.  Just assign the objects to a global list that you can change the visibility for.
Tim

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

Please think about donating if this post helped you.

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Color 255
« Reply #18 on: September 14, 2006, 05:01:14 PM »
Now to make it more useful, if that data could be remembered so Martin can Isolate and Un-Isolate (2 separate) commands as he is reviewing the 255s.  Because us Archies will have stuff scattered all over the place sometimes he will need to see the adjacent objects that are shut-off to see the 255s relation to those adjacent objects.  He can toggle until everything is change to his liking.

My two sent suggestion.
Okay.
Code: [Select]
(defun c:BlankObjects(/ ActDoc clr LayList)

(defun GetLayerList (Doc Clr / LayList)

(vlax-for Lay (vla-get-Layers Doc)
 (if (equal (vla-get-Color Lay) Clr)
  (setq LayList (cons (vla-get-Name Lay) LayList))
 )
)
LayList
)
;-----------------------------------------------------------------------------
(setq ActDoc (vla-get-ActiveDocument (vlax-get-Acad-Object)))
(if
 (and
  (setq Clr (getint "\n Enter color number NOT to blank it's objects: "))
  (if GlbVarObjectList
   (progn
    (initget "Yes No")
    (if (/= (getkword "\n List aready exist, wisg to overwrite it? [<Y>es/No]: ") "No")
     (foreach Obj GlbVarObjectList
      (vla-put-Visible Obj :vlax-false)
     )
     T
    )
   )
   T
  )
 )
 (progn
  (setq LayList (GetLayerList ActDoc Clr))
  (vlax-for Lo (vla-get-Layouts ActDoc)
   (vlax-for Obj (vla-get-Block Lo)
    (if
     (or
      (and
       (vl-position (vla-get-Layer Obj) LayList)
       (not (equal (vla-get-Color Obj) 256))
      )
      (and
       (not (vl-position (vla-get-Layer Obj) LayList))
       (not (equal (vla-get-Color Obj) Clr))
      )
     )
     (progn
      (setq GlbVarObjectList (cons Obj GlbVarObjectList))
      (vla-put-Visible Obj :vlax-false)
     )
    )
   )
  )
 )
)
(princ)
)
Code: [Select]
(defun c:UnBlankObjects ()

(if GlbVarObjectList
 (foreach Obj GlbVarObjectList
  (vla-put-Visible Obj :vlax-true)
 )
 (prompt "\n No objects have been blanked using \"BlankObjects\" command.")
)
(princ)
)
Tim

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

Please think about donating if this post helped you.

Krushert

  • Seagull
  • Posts: 13679
  • FREE BEER Tomorrow!!
Re: Color 255
« Reply #19 on: September 14, 2006, 07:26:08 PM »
Totally Swwwweeeeeettt.   8-)

though here comes the bad news.

the major bad:  I think there is a typo  :-D :-D

   (progn
    (initget "Yes No")
    (if (/= (getkword "\n List aready exist, wisg to overwrite it? [<Y>es/No]: ") "No")

The minor bad:  I was a bit confused on the yes/no.  To overwrite list I had to enter "NO".  Is that correct?  My first thought was "YES" I wanted to overwrite the list.  If this is your intention, no problem, just trying to understand.  :-)

I + XI = X is true ...  ... if you change your perspective.

I no longer CAD or Model, I just hang out here picking up the empties beer cans

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Color 255
« Reply #20 on: September 14, 2006, 07:30:21 PM »
Totally Swwwweeeeeettt.   8-)

though here comes the bad news.

the major bad:  I think there is a typo  :-D :-D

   (progn
    (initget "Yes No")
    (if (/= (getkword "\n List aready exist, wisg to overwrite it? [<Y>es/No]: ") "No")

The minor bad:  I was a bit confused on the yes/no.  To overwrite list I had to enter "NO".  Is that correct?  My first thought was "YES" I wanted to overwrite the list.  If this is your intention, no problem, just trying to understand.  :-)


It should say
Quote
List aready exist, wish to overwrite it? [<Y>es/No]:

I put this in incase you ran the command twice with the same color, this way it would be faster, as it has the list of all the objects you wanted to blank with no need to search the drawing again.

Glad you find it useful.
Tim

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

Please think about donating if this post helped you.

sinc

  • Guest
Re: Color 255
« Reply #21 on: September 17, 2006, 05:06:16 AM »

Thanks for the suggestion.  That could work -- our color 255 entities are already on a dedicated layer.


Why are you using Color 255 = 0% Screen to create NoPlot items?

You said all the items you don't want to plot are already on their own dedicated layer.  Why don't you just set that layer to "No Plot" using the layer properties, and leave Color 255 as a normal printing color?

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Color 255
« Reply #22 on: September 17, 2006, 04:01:01 PM »

Thanks for the suggestion.  That could work -- our color 255 entities are already on a dedicated layer.


Why are you using Color 255 = 0% Screen to create NoPlot items?

You said all the items you don't want to plot are already on their own dedicated layer.  Why don't you just set that layer to "No Plot" using the layer properties, and leave Color 255 as a normal printing color?
Because if the layer is non-plotting, then Acad won't look at it for extents, but if there are items that are at a screening of 0, then it will see them, and 'try' to print them.  It's an issue of centering on the paper.  I have had to do the same thing at other jobs before.

I hope that made sense.
Tim

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

Please think about donating if this post helped you.

sinc

  • Guest
Re: Color 255
« Reply #23 on: September 19, 2006, 09:31:43 PM »

Because if the layer is non-plotting, then Acad won't look at it for extents, but if there are items that are at a screening of 0, then it will see them, and 'try' to print them.  It's an issue of centering on the paper.  I have had to do the same thing at other jobs before.

I hope that made sense.

Not really...

Can you explain exactly what you mean?  I've tried tests with both ZOOM EXTENTS and the "Extents" option for Plot Area in the Plot Dialog, and in every case, Autocad used object on non-plotting layers to determine the extents.

hmspe

  • Bull Frog
  • Posts: 362
Re: Color 255
« Reply #24 on: September 20, 2006, 12:41:55 AM »
It really has nothing to do with what Autocad sees as the extents.  I have an Oce TDS 400.  Neither the techs who work on it nor I have found a way to get it position a page properly unless I put entities very near the margins of the printed sheet, then tell the plotter to center the plot on a standard size sheet.  I put small tick marks .003" inside the upper left and lower right corners of the sheet.  Just drawing a full size border doesn't work -- there have to be entities the "printable area".  If the tick marks are on a layer that is set "non print" they don't get sent to the plotter, and the pllotter centers the inked area (which generally means the plot is shifted left on the sheet because we have a binding margin).  If the tick marks are set to color 255, which for us is 0% screened, the marks get sent to the plotter, which means the image centers correctly, but the tick marks don't show because of the 0% screening.  The tick marks can be any color, but the plots look a lot more professional if the ticks don't show.     

Hope that makes it clearer.

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

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Color 255
« Reply #25 on: September 20, 2006, 11:32:32 AM »
This used to happen with one company I worked with that had an Hp750C.  There is a setting on the plotter to save paper, you will have to adjust this setting (turn it off), and then it should plot the way you want it to.

That was what I meant by my other post, sorry that I didn't explain it the way Martin did.
Tim

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

Please think about donating if this post helped you.

sinc

  • Guest
Re: Color 255
« Reply #26 on: September 20, 2006, 12:14:15 PM »
It really has nothing to do with what Autocad sees as the extents.  I have an Oce TDS 400.  Neither the techs who work on it nor I have found a way to get it position a page properly unless I put entities very near the margins of the printed sheet, then tell the plotter to center the plot on a standard size sheet.  I put small tick marks .003" inside the upper left and lower right corners of the sheet.  Just drawing a full size border doesn't work -- there have to be entities the "printable area".  If the tick marks are on a layer that is set "non print" they don't get sent to the plotter, and the pllotter centers the inked area (which generally means the plot is shifted left on the sheet because we have a binding margin).  If the tick marks are set to color 255, which for us is 0% screened, the marks get sent to the plotter, which means the image centers correctly, but the tick marks don't show because of the 0% screening.  The tick marks can be any color, but the plots look a lot more professional if the ticks don't show.     

It's possible that your problems are arising due to the fact that you are telling your printer to center the plot.  You may have started doing this because your printer has it's "Inked Area" option turned on, as Tim states.  I suspect you should get what you want if you make sure this option is off in your plotter.  If you need to, you should be able to create a PC3 file with that option off, and always use your PC3 file to plot your drawings (so you don't have to manually turn that option off in your plotter every time you print).

Once your printer stops changing things, you should be able to do all the centering in Autocad.  This is better, anyway - ideally, when you hit "Print Preview", you should see EXACTLY what will come out of your plotter.

hmspe

  • Bull Frog
  • Posts: 362
Re: Color 255
« Reply #27 on: September 20, 2006, 05:46:14 PM »
[It's possible that your problems are arising ...

Entirely possible, but we haven't found a way.  The techs who set the unit up burned through most of a roll of paper trying different settings, but he never came up with settings that worked the way things did with the old inkjet.  The tick marks are what I came up with after the tech left.  I wrote a lisp to handle inserting the tick marks, so it's not too much of an issue.  We do use a separate pc3 file for each paper size we use.

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

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Color 255
« Reply #28 on: September 20, 2006, 05:47:49 PM »
Okay.  So is there anything you are still wanting/needing help with?
Tim

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

Please think about donating if this post helped you.

sinc

  • Guest
Re: Color 255
« Reply #29 on: September 20, 2006, 06:24:06 PM »

We do use a separate pc3 file for each paper size we use.


I wonder if that has anything to do with it?  You shouldn't need a separate PC3 file for each paper size, although I've discovered that on some printers you may need a separate PC3 for landscape vs. portrait, or Land Desktop contour labels may rotate incorrectly.  (This only seems to apply to printers that can load multiple paper sizes simultaneously in multiple orientations, and only in Autocad 2006 and 2007 AFAIK.)

Of course, not ever having used any Oce printers, I don't know anything about any Oce-specific issues that may exist.  A housemate of mine (back in 1994) worked for Oce as a software engineer, but I never actually used any of their equipment.  It seems like there should be a way to fix this issue without the Color 255 hack, but without an Oce printer, I can't really say.

hmspe

  • Bull Frog
  • Posts: 362
Re: Color 255
« Reply #30 on: September 21, 2006, 12:26:17 AM »
Okay.  So is there anything you are still wanting/needing help with?

At this point I mostly need enough break in the workload to see what I can code.  I'll also check with some other Oce users to see if they've solved the centering problem. 

Thanks for the help.

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