Results 1 to 3 of 3

Thread: List of Blocks in Xref

  1. #1
    I could stop if I wanted to
    Join Date
    2001-01
    Posts
    257
    Login to Give a bone
    0

    Talking List of Blocks in Xref

    Hi Everyone-

    I need help writing a routine that will build a list of all the blocks in the current drawing including those residing in an xreference. I tried using the tblsearch function but it only returns those blocks in the current drawing. Any help is greatly appreciated. Thanks.

    Manuel

  2. #2
    Member
    Join Date
    2004-02
    Location
    Tampa, Florida
    Posts
    32
    Login to Give a bone
    0

    Default Re: List of Blocks in Xref

    probably more than you need but ........
    Code:
    (defun get-active-doc ()
     (vla-get-activedocument (vlax-get-acad-object))
     )
    
    (defun get-blk-names2 (/			blk			 layout_blks
    					   xref_blks	blks		 blk_name_list
    					   )
    
      (vlax-for	blk	(vlax-get-property (get-active-doc) 'Blocks)
    	(cond ((= (vlax-get-property blk 'IsLayout) :vlax-true)
    		   (setq layout_blks
    				  (cons (vlax-get-property blk 'Name) layout_blks)
    				 )
    		   )
    		  ((= (vlax-get-property blk 'IsXRef) :vlax-true)
    		   (setq xref_blks
    				  (cons (vlax-get-property blk 'Name) xref_blks)
    				 )
    		   )
    		  (T (setq blks (cons (vlax-get-property blk 'Name) blks)))
    		  )
    	)
      (setq blk_name_list (list layout_blks xref_blks blks))
      )
    
    (setq blst (get-blk-names2))

  3. #3
    I could stop if I wanted to
    Join Date
    2001-01
    Posts
    257
    Login to Give a bone
    0

    Default Re: List of Blocks in Xref

    Mark-

    Thanks for the code. I'll try it out.

    Manuel

Similar Threads

  1. XREF Manager to list if xrefs are attached to another Xref
    By autocad.wishlist1734 in forum AutoCAD Wish List
    Replies: 5
    Last Post: 2014-10-28, 04:13 AM
  2. xref list extraction
    By LSElite in forum AutoLISP
    Replies: 9
    Last Post: 2013-01-16, 04:00 PM
  3. Xref List to Dialog Box
    By fletch97 in forum AutoLISP
    Replies: 5
    Last Post: 2009-09-03, 02:22 AM
  4. 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
  5. A way to list where a drawing is Xref'd
    By jeff.garr in forum AutoCAD General
    Replies: 8
    Last Post: 2008-03-10, 12:18 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
  •