Results 1 to 4 of 4

Thread: Find all nested XRefs in a dwg with LISP and change attached XRefs to overlays with LISP

  1. #1
    Member
    Join Date
    2015-01
    Posts
    34
    Login to Give a bone
    0

    Default Find all nested XRefs in a dwg with LISP and change attached XRefs to overlays with LISP

    My company has a client we do many projects for and their CAD standards do not allow nested XRefs or attached XRefs.

    I'm writing a routine in which I iterate through the block table with tblsearch and check all XRef's by bit-masking the DXF 70 value for 'resolved' (bit-mask 32) and 'overlay' (bit-mask 8 ). If it is resolved and not an overlay, then I check with ssget to see if there are any instances in the dwg. If not, then I assume it's nested. Not very elegant. I read a post that said a bit mask of 64 in the DXF 70 value means it's nested but this doesn't seem to be the case. Is there a better way to directly check an XRef's status for being nested? (Hopefully with Visual LISP but AutoLISP is OK.)

    Also, is there any way to change an attached XRef into an overlay in Visual LISP or AutoLISP?

    Lastly, in working on this routine, I noticed that when I erase an XRef in a session, causing it to become unreferenced, the next time I open the dwg, the unreferenced XRef has been removed. Is this how AutoCAD is supposed to work? (I'm using AutoCAD 2018 ) I don't have a problem with this, I just need to know if I can depend on this behaviour when the client gets the drawings.

    As always, any help is greatly appreciated.

  2. #2
    Certified AUGI Addict rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Earth
    Posts
    9,631
    Login to Give a bone
    0

    Default Re: Find all nested XRefs in a dwg with LISP and change attached XRefs to overlays with LISP

    I wonder if this tool might be able to help. And if not, perhaps the author could add what you need?
    R.K. McSwain | CAD Panacea |

  3. #3
    Member
    Join Date
    2015-01
    Posts
    34
    Login to Give a bone
    0

    Default Re: Find all nested XRefs in a dwg with LISP and change attached XRefs to overlays with LISP

    Thanks for the tip R.K. I'll look into it further as I really like other work I've seen from him.

    For now, I'm just going with my hack for finding nested XRefs. I hacked the attach->overlay problem by detaching the attached XRef and reattaching it as an overlay. Again, not very elegant but not too painful as all XRefs are always inserted @ 0,0,0, rotation 0 & scale 0. I remain hopeful for a better solution though.

  4. #4
    Certifiable AUGI Addict
    Join Date
    2001-03
    Location
    Tallahassee, FL
    Posts
    3,165
    Login to Give a bone
    0

    Default Re: Find all nested XRefs in a dwg with LISP and change attached XRefs to overlays with LISP

    No matter how you do it all existing xref layer and viewport overrides will disappear for those nested xrefs. Depending on how much they're used rebuilding the drawings could be time consuming. Best to avoid using any nested xrefs in future drawings for that client.
    Tom Beauford P.S.M. - Civil 2019 on Windows 10 Enterprise
    Design Analysis - Leon County Public Works/Engineering Wrap [CODE] tags around selected text
    2280 Miccosukee Rd. Tallahassee, FL 32308-5310
    Ph# (850)606-1516 Home Page

Similar Threads

  1. Replies: 6
    Last Post: 2016-11-16, 08:57 PM
  2. 2014: DWG Nested Inside Detail Comp. > Nested Inside Profile > Nested Inside Window
    By edu.rocha.tavares in forum Revit Architecture - Families
    Replies: 5
    Last Post: 2013-11-26, 06:46 PM
  3. 2012: After upgrading to 2012, all linked CAD overlays have become invisible!?
    By cslaten78249688 in forum Revit Architecture - General
    Replies: 1
    Last Post: 2011-09-15, 01:31 PM
  4. Walls disappearing from DWG exports of views with overlays
    By sven.129574 in forum Revit Architecture - General
    Replies: 5
    Last Post: 2007-06-12, 04:33 PM
  5. Convert Attached Xrefs to Overlays
    By BCrouse in forum AutoCAD General
    Replies: 3
    Last Post: 2006-02-10, 03:09 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
  •