Saturday, November 21, 2009
Home   |   Search   |   About AUGI   |   My AUGI   |   Join Now

Go Back   AUGI Forums > AUGI Technical (English) > Programming > AutoLISP
 Welcome, Guest. 

Login

Join Now FAQ Members List Calendar Search Today's Posts Mark Forums Read

AutoLISP AutoLISP or Visual LISP, learn both here!

Reply
 
Thread Tools Display Modes
Old 2004-06-16, 09:29 PM   #1
cadconcepts
100 Club
 
Join Date: 2001-01
Posts: 120
cadconcepts is starting their journey
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
cadconcepts is offline   Reply With Quote
Old 2004-06-16, 09:54 PM   #2
MarkTheSwampThomas
Member
 
Join Date: 2004-02
Location: Tampa, Florida
Posts: 32
MarkTheSwampThomas is glowing brightlyMarkTheSwampThomas is glowing brightlyMarkTheSwampThomas is glowing brightlyMarkTheSwampThomas is glowing brightlyMarkTheSwampThomas is glowing brightlyMarkTheSwampThomas is glowing brightlyMarkTheSwampThomas is glowing brightlyMarkTheSwampThomas is glowing brightlyMarkTheSwampThomas is glowing brightlyMarkTheSwampThomas is glowing brightlyMarkTheSwampThomas is glowing brightly
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))
__________________
C3D/LDT2006
I'd rather be using NetBSD
MarkTheSwampThomas is offline   Reply With Quote
Old 2004-06-17, 03:20 AM   #3
cadconcepts
100 Club
 
Join Date: 2001-01
Posts: 120
cadconcepts is starting their journey
Default RE: List of Blocks in Xref

Mark-

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

Manuel
cadconcepts is offline   Reply With Quote
Reply


Go Back   AUGI Forums > AUGI Technical (English) > Programming > AutoLISP

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

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


All times are GMT +1. The time now is 04:04 PM.