See the top rated post in this thread. Click here

Results 1 to 6 of 6

Thread: Zoom to object in XREF

  1. #1
    Member
    Join Date
    2015-06
    Posts
    2
    Login to Give a bone
    0

    Default Zoom to object in XREF

    Hey everybody, new user, first post here.

    Is there anyway to select a single object in an XREF, without selecting the entire XREF?

    In this case, this is specifically to use the zoom to object command, not to edit anything.

  2. #2
    Administrator rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Earth
    Posts
    9,803
    Login to Give a bone
    0

    Default Re: Zoom to object in XREF

    I have not tested it, but thinking out loud, I'm thinking you could use something like this to grab the nested entity:

    (setq x (car (nentsel "\nSelect an object ")))

    Then find the bounding box for that object and zoom to those coordinates.
    R.K. McSwain | CAD Panacea |

  3. #3
    Member
    Join Date
    2015-06
    Posts
    2
    Login to Give a bone
    0

    Default Re: Zoom to object in XREF

    Thanks for the recommendation. That makes sense and looks like it would work. I’ve never written a lisp, guess its time to figure that out. I’ve been putting it off too long...

    I’ll see what I can come up with.

  4. #4
    Administrator rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Earth
    Posts
    9,803
    Login to Give a bone
    1

    Default Re: Zoom to object in XREF

    @zebchamlee -- here is a quick and dirty version. No error checking included.

    Code:
    (defun c:foo ( / x obj minP maxP)
      (setq x (car (nentsel "\nSelect an object ")))
      (setq obj (vlax-ename->vla-object x))
      (vla-GetBoundingBox obj 'minP 'maxP)  
      (command "._zoom" "_W"
        (vlax-safearray->list minP)
        (vlax-safearray->list maxP)
      )
    )
    R.K. McSwain | CAD Panacea |

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

    Default Re: Zoom to object in XREF

    Either select the block ==> right click ==> Block-Editor ... and do your modifications in that space ... or

    run command _EXPLODE to make all objects within the block to separate objects.

  6. #6
    Certified AUGI Addict cadtag's Avatar
    Join Date
    2000-12
    Location
    Cairo - no, not Illinois
    Posts
    5,069
    Login to Give a bone
    0

    Default Re: Zoom to object in XREF

    just what does that have to do with the original question?????

Similar Threads

  1. 2018: Object Selection in 3D view changes view focus, View zoom. Zoom level.
    By arch_kashif in forum Revit - Platform
    Replies: 0
    Last Post: 2019-11-23, 01:59 PM
  2. 2008 SCALE 1:100 xref xref xref xref- scale list issues
    By Apsis0215 in forum AutoCAD Customization
    Replies: 2
    Last Post: 2008-11-21, 08:17 PM
  3. Zoom, zoom, zoom...
    By Steve_Bennett in forum AutoCAD General
    Replies: 4
    Last Post: 2005-06-15, 02:59 PM
  4. ucsfollow zoom rotates view without zoom extents
    By dbroad in forum AutoCAD Wish List
    Replies: 2
    Last Post: 2004-10-05, 06:21 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
  •