Jump to content

change xref color


astrosfan

Recommended Posts

Is there a way to change the color of XREF (or several XREFs) and then change it back to its original color? I have several in a drawing that I would like to change to one color kind of use as a background while I do my work. But they would need to be changed back to the original colors.

 

Astrofan

Link to comment
Share on other sites

Is there a way to change the color of XREF (or several XREFs) and then change it back to its original color? I have several in a drawing that I would like to change to one color kind of use as a background while I do my work. But they would need to be changed back to the original colors.

 

Astrofan

While working on the master drawing ensure VISRETAIN is set to 0. Change the colours of the XREF dependant layers in the layer properties dialogue box. If VISRETAIN is set to 0 the next time you open the drawing the layers from the XREF will be reloaded, in this case back to their original colour.

 

If you wanted to, you could change them back manually also, of course.

Link to comment
Share on other sites

While working on the master drawing ensure VISRETAIN is set to 0. Change the colours of the XREF dependant layers in the layer properties dialogue box. If VISRETAIN is set to 0 the next time you open the drawing the layers from the XREF will be reloaded, in this case back to their original colour.

 

If you wanted to, you could change them back manually also, of course.

 

 

THANKS! I will give it a try!

Link to comment
Share on other sites

You also could use the layer states manager and make one called "original" than change your colors to whatever you wanted to to do your work and once your done restore the "original" layer state. I use these all the time and they work like a charm if you dont want to change visretain.

Link to comment
Share on other sites

  • 1 month later...

Is there another option to completely gray out an Xref?

 

My objective is to gray out an xref so everything I draw in this new drawing is easy to see and also much better when plotted!

I do this with layerstatemanager after I select all the xref layers(ctrl-a) and put them in color 252 then save it to 'Gray out'.

But some objects and lines still remain in a color when I set all the layers of an xref to color 252. (color not set by Layer)

 

Help is much appreciated!

Link to comment
Share on other sites

Attila,

 

Blocks won't change color when you do it like that. What you need to do is open up the layer properties dialog box, click on the top xref layer, scroll down and hold shift while clicking the last xref layer so that all the layers that have to do with the xref are highlighted, then pick any one of their color options and change it to 252. This will ensure blocks are changed also. Hope this helps.

Link to comment
Share on other sites

Attila,

 

Blocks won't change color when you do it like that. What you need to do is open up the layer properties dialog box, click on the top xref layer, scroll down and hold shift while clicking the last xref layer so that all the layers that have to do with the xref are highlighted, then pick any one of their color options and change it to 252. This will ensure blocks are changed also. Hope this helps.

 

Thats what I'm sayin, I select every single Xref layer, Then put them in the same color. 95% of my drawing is converted to the color I selected, But there are some objects and lines etc. still remaining in an other color The Xref is to big to go and change all the remaining colors to the color I want.

 

Thx RichterGMC.

Link to comment
Share on other sites

I have a question about color. I have a drawing of a floor plan. It is divided up into 5 different branches. I want to designate a color to each branch. How do I add color to the rooms themself???

Link to comment
Share on other sites

Post a new thread for your new question that way poeple wil more likely be faster to see your thread and help you out kbattist.

Link to comment
Share on other sites

  • 4 months later...

Hi,

I am new for Xref. I learn step by step whenever I face the problem. your question and other people's answer were very helpful for me to gray out all xref color together.

I don't know that you got the answer of your this question or not but i found out 1 solution.

Go to your original file (which is used as a xref in your new file). select all objects by ctrl+A. then go to property & change the color to "By Layer". now when you will go to your new file and upload this changes, your all layers will be in gray.

I hope this will help you.

Link to comment
Share on other sites

If the objects not turning gray are blocks you would generally have to go into block editor and change the block from by color to by layer, or you could run the lisp below written by kpblc and it will do it for you

Author kpblc 
changes all blocks inserted in a dwg from by block/color to by layer.
(defun c:norm (/ *error* adoc lst_layer func_restore-layers)
 (defun *error* (msg)
   (func_restore-layers)
   (vla-endundomark adoc)
   (princ msg)
   (princ)
   ) ;_ end of defun
 (defun func_restore-layers ()
   (foreach item lst_layer
     (vla-put-lock (car item) (cdr (assoc "lock" (cdr item))))
     (vl-catch-all-apply
       '(lambda ()
          (vla-put-freeze (car item) (cdr (assoc "freeze" (cdr item))))
          ) ;_ end of lambda
       ) ;_ end of vl-catch-all-apply
     ) ;_ end of foreach
   ) ;_ end of defun
 (vl-load-com)
 (vla-startundomark
   (setq adoc (vla-get-activedocument (vlax-get-acad-object)))
   ) ;_ end of vla-startundomark
 (vlax-for item (vla-get-layers adoc)
   (setq lst_layer (cons (list item
                               (cons "lock" (vla-get-lock item))
                               (cons "freeze" (vla-get-freeze item))
                               ) ;_ end of list
                         lst_layer
                         ) ;_ end of cons
         ) ;_ end of setq
   (vla-put-lock item :vlax-false)
   (vl-catch-all-apply '(lambda () (vla-put-freeze item :vlax-false)))
   ) ;_ end of vlax-for
 (vlax-for blk (vla-get-blocks adoc)
   (if (and (equal (vla-get-islayout blk) :vlax-false)
            (equal (vla-get-isxref blk) :vlax-false)
            ) ;_ end of and
     (progn
       (vlax-for subent blk
          ;(vla-put-layer subent "0");edit-> removed force to layer 0
         (vla-put-color subent 256)
         (vla-put-lineweight subent aclnwtbyblock)
         (vla-put-linetype subent "byblock")
         ) ;_ end of vlax-for
       ) ;_ end of progn
     ) ;_ end of if
   ) ;_ end of vlax-for
 (func_restore-layers)
 (vla-endundomark adoc)
(command "_regenall")
 (princ)
 ) ;_ end of defun

Link to comment
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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

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