Results 1 to 5 of 5

Thread: Xref layer state

  1. #1
    100 Club
    Join Date
    2006-12
    Posts
    145
    Login to Give a bone
    0

    Question Xref layer state

    Is there a way to save layer state of 1 xref's layers and after apply that layer state to same xref's layers in another drawing?
    I have ~10 drawings. To all these 10 drawings are attached few files (xrefs), VISRETAIN=1. To one reference file following changes are applied: 1 layer gone, 2 new layers arrived. After that I open 1 of those 10 drawings, reconcile 2 new layers and adjust their properties as I need and adjust properties of few other layers (old layers) of that xref . At this point question comes: is there a way to save layer state of layers belonging only to that one particular xref that has changed and after apply it to same xref's layers in another 9 drawings? Instead of opening all 9 drawings and adjusting layers manually? Note: these 10 drawings share few other xrefs and for them layer states vary among those 10 drawings. So it is very import not to change states of other xref layers.

    I searched a bit through forums, but didn't succeed to find similar thread.
    Could the way be to change layer state in xref drawing as I need, change temporaly VISRETAIN to 0, reload or detach/attach xref and then change VISRETAIN back to 1? Or something like that?

  2. #2
    Certifiable AUGI Addict tedg's Avatar
    Join Date
    2005-06
    Location
    in the upper right corner
    Posts
    3,507
    Login to Give a bone
    0

    Default Re: Xref layer state

    Quote Originally Posted by Yancka View Post
    ....I searched a bit through forums, but didn't succeed to find similar thread.
    Could the way be to change layer state in xref drawing as I need, change temporaly VISRETAIN to 0, reload or detach/attach xref and then change VISRETAIN back to 1? Or something like that?
    For this, check out this thread
    A lisp routine that does exactly this, set your xrefs the way you want them, and run the routine.

    Hope it helps.

  3. #3
    Member
    Join Date
    2005-08
    Posts
    44
    Login to Give a bone
    0

    Default Re: Xref layer state

    One way to handle this will be to make the changes to the Xref layers; Do a save-as to a temp file; Get rid of all other Xrefs and drawing layers; Create a sanp-shot of the remaining layer state (which will include only that specific Xref layers); Export it and Import to other drawings to restore.

    To make the changes to the Xref file itself will work just as good.
    My 2 cents on doing this is that if I reference a consultant file (which most likely I will get updates to) I will make the changes after Xrefing it to save me from redoing the changes; otherwise I will change it in the original file as you suggested and reload.

    Good luck

  4. #4
    Certifiable AUGI Addict
    Join Date
    2015-11
    Location
    Jo'burg SA
    Posts
    4,512
    Login to Give a bone
    0

    Default Re: Xref layer state

    Or also: you could modify the original file xreffed into all 10 to the desired layer settings, save & close. Then open each of the 10 in turn, set VISRETAIN to 0 and reload only that XRef, then set VISRETAIN back to 1. You may also then want to update your layer states so the new change takes effect in the states as well.

    The lisp that tedg linked to will do exactly this, but reload all xrefs so you'll lose the settings for other xrefs as well. You could modify the lisp by changing the * in (command "-xref" "reload" "*") to the name of the xref you want to reload. Then you've got a lisp which automates the process per drawing.

    Or better yet, create a script and run it through ScriptPro - then it's a one click operation and wait for AutoCAD to do the work.

  5. #5
    Woo! Hoo! my 1st post
    Join Date
    2008-01
    Posts
    1
    Login to Give a bone
    0

    Default Re: Xref layer state

    just create a CUI button

    ^C^CQSAVE;VISRETAIN;0;XREF;R;*;VISRETAIN;1;^C^C-XREF;R;*;

Similar Threads

  1. Replies: 3
    Last Post: 2007-10-16, 07:22 PM
  2. Visretain / xref layer state collapse
    By phoulx in forum AutoCAD General
    Replies: 4
    Last Post: 2007-03-01, 05:57 PM
  3. Layer State not restoring Color within Xref file
    By judekw in forum AutoCAD General
    Replies: 13
    Last Post: 2007-01-07, 10:52 AM
  4. Ignore XREF portion of layer name upon restoring layer state
    By autocad.wishlist1734 in forum AutoCAD Wish List
    Replies: 0
    Last Post: 2006-11-08, 12:30 PM
  5. Replies: 8
    Last Post: 2006-10-11, 07:36 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •