|
Welcome, Guest.
|
||||||
| AutoLISP AutoLISP or Visual LISP, learn both here! |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
100 Club
Join Date: 2001-01
Posts: 120
![]() |
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 |
|
Member
Join Date: 2004-02
Location: Tampa, Florida
Posts: 32
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
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 |
|
100 Club
Join Date: 2001-01
Posts: 120
![]() |
Mark-
Thanks for the code. I'll try it out. Manuel |
|
|
|
![]() |
|
||||||
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Folder or List | sdcltd | AutoCAD General | 4 | 2004-06-16 08:38 AM |
| Design Center blocks not scaling properly | mjsregister | ACA General | 3 | 2004-06-14 10:27 PM |
| reload xref - layers | kca2.69080 | ACA General | 2 | 2004-06-02 11:44 PM |
| List of problems after my first big work with Revit | overcaffeined | Revit Architecture - General | 12 | 2004-02-04 05:43 AM |