Author Topic: Where is the BlockPropertiesTable info stored  (Read 1377 times)

0 Members and 1 Guest are viewing this topic.

Peter Jamtgaard

  • Guest
Where is the BlockPropertiesTable info stored
« on: July 12, 2012, 08:13:27 PM »
Someone asked this over at AUGI/LISPForum and I thought you guys might enjoy this.

Peter


Code: [Select]

(defun C:BlockPropertiesTable (/ blnOut entBlock entItem entSelection lstENtity lstEntity2 objSelection )
 (if (setq ssSelection (ssget ":S:E" (list (cons 0 "INSERT"))))
  (progn
   (setq entSelection (ssname ssSelection 0)
         objSelection (vlax-ename->vla-object entSelection)
         strBlockName (vla-get-name objSelection)
         entBlock     (tblobjname "block" strBlockName)
         entItem      entBlock
   )
   (while (and (setq entItem (entnext entItem))(not blnOut))
    (setq lstEntity (entget entItem))
    (if (and (assoc 102 lstEntity)
             (setq dprPair (assoc 330 lstEntity))
             (setq lstEntity2 (entget (cdr dprPair)))           
             (= (cdr (assoc 0 lstEntity2)) "BLOCKPROPERTIESTABLE")
        )
     (progn
      (setq blnOut T)
      (print lstEntity2)
     )
    )
   )
  )
 )
 (princ)
)


CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Where is the BlockPropertiesTable info stored
« Reply #1 on: July 16, 2012, 09:18:46 AM »
Thanks for sharing Peter.  8-)
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

BlackBox

  • King Gator
  • Posts: 3770
Re: Where is the BlockPropertiesTable info stored
« Reply #2 on: July 16, 2012, 09:50:34 AM »
Hrrmm... Peter posting code by Peter... Yet another interweb coinkydink :lol:

Cheers, Peter! :beer:
"How we think determines what we do, and what we do determines what we get."