See the top rated post in this thread. Click here

Page 1 of 3 123 LastLast
Results 1 to 10 of 24

Thread: Dynamic Block Table Properties

  1. #1
    Design Visualization Moderator stusic's Avatar
    Join Date
    2004-10
    Location
    Denver, Colorado
    Posts
    1,515
    Login to Give a bone
    0

    Question Dynamic Block Table Properties

    Is there a way to get the info from a Block Table (the new version of a lookup table) inside of a Dynamic Block using LISP? I need to get the values of a particular column put into a list, but I've only heard of people doing it with .NET or C+...

    Thank ya!

  2. #2
    Past Vice President / AUGI Volunteer peter's Avatar
    Join Date
    2000-09
    Location
    Honolulu HI
    Posts
    1,109
    Login to Give a bone
    0

    Default Re: Dynamic Block Table Properties

    I haven't played with .net yet but it seems the value of the table can be accessed but the options in the table cannot.



    As far as I can see

    Code:
    ; IAcadDynamicBlockReferenceProperty: AutoCAD Dynamic Block Property Interface
    ; Property values:
    ;   AllowedValues (RO) = nil
    ;   Description (RO) = ""
    ;   PropertyName (RO) = "Block Table1"
    ;   ReadOnly (RO) = 0
    ;   Show (RO) = -1
    ;   UnitsType (RO) = 0
    ;   Value = 3
    ; No methods
    If it exposed to .net you can create a lispmetho to expose it to lisp.

    Peter
    AutomateCAD

  3. #3
    Design Visualization Moderator stusic's Avatar
    Join Date
    2004-10
    Location
    Denver, Colorado
    Posts
    1,515
    Login to Give a bone
    0

    Default Re: Dynamic Block Table Properties

    Yeah, that's about as far as I've gotten. I'm with you though - haven't played with .net at all...

    Hrm...

  4. #4
    Administrator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,719
    Login to Give a bone
    0

    Default Re: Dynamic Block Table Properties

    Perhaps you could post a sample drawing on which others can test?
    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3660, Core i9-12900K 5.2GHz, 64GB DDR5 RAM, PCIe 4.0 M.2 SSD (RAID 0), 16GB NVIDIA RTX A4000

  5. #5
    Design Visualization Moderator stusic's Avatar
    Join Date
    2004-10
    Location
    Denver, Colorado
    Posts
    1,515
    Login to Give a bone
    0

    Default Re: Dynamic Block Table Properties

    Here you go. A simple block with 3 attributes (PART, DESC, QTY), with a Block Properties Table containing 5 items. The goal of this is to extract the 5 items into something useable (ideally, a lisp variable).

    Thanks
    Attached Files Attached Files
    Last edited by stusic; 2012-07-10 at 07:34 PM. Reason: Helps to attach the file ;)

  6. #6
    Administrator Opie's Avatar
    Join Date
    2002-01
    Location
    jUSt Here (a lot)
    Posts
    9,106
    Login to Give a bone
    0

    Default Re: Dynamic Block Table Properties

    You forgot the file.
    If you have a technical question, please find the appropriate forum and ask it there.
    You will get a quicker response from your fellow AUGI members than if you sent it to me via a PM or email.
    jUSt

  7. #7
    Design Visualization Moderator stusic's Avatar
    Join Date
    2004-10
    Location
    Denver, Colorado
    Posts
    1,515
    Login to Give a bone
    0

    Default Re: Dynamic Block Table Properties

    Quote Originally Posted by Opie View Post
    You forgot the file.
    Duly noted.
    Last edited by stusic; 2012-07-10 at 07:43 PM. Reason: Spellcheck is free.

  8. #8
    Past Vice President / AUGI Volunteer peter's Avatar
    Join Date
    2000-09
    Location
    Honolulu HI
    Posts
    1,109
    Login to Give a bone
    1

    Default Re: Dynamic Block Table Properties

    That was a REALLY good question!

    It isn't pretty but....

    Peter

    Code:
    (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)
    )
    AutomateCAD

  9. #9
    Design Visualization Moderator stusic's Avatar
    Join Date
    2004-10
    Location
    Denver, Colorado
    Posts
    1,515
    Login to Give a bone
    0

    Thumbs up Re: Dynamic Block Table Properties

    Wow! That's awesome! I really wasn't expecting a solution, just verifying it couldn't be done without .net

    Now I can do anything!!!!

    Thanks a ton, Peter. I've seen people ask to do this all over the place, so maybe they'll find it here

  10. #10
    Active Member
    Join Date
    2015-08
    Posts
    59
    Login to Give a bone
    0

    Default Re: Dynamic Block Table Properties

    Quote Originally Posted by stusic View Post
    Here you go. A simple block with 3 attributes (PART, DESC, QTY), with a Block Properties Table containing 5 items. The goal of this is to extract the 5 items into something useable (ideally, a lisp variable).

    Thanks
    Is it possible to knock down your example drawing to AC2008 so we can play too ?
    TIA,
    Steve

Page 1 of 3 123 LastLast

Similar Threads

  1. Replies: 2
    Last Post: 2013-01-08, 06:16 PM
  2. Table for updating dynamic block properties
    By parkerfeldman in forum AutoLISP
    Replies: 0
    Last Post: 2009-02-03, 07:34 PM
  3. Change Dynamic Properties of a DB in a Table
    By autocad.wishlist1734 in forum AutoCAD Wish List
    Replies: 0
    Last Post: 2008-06-05, 02:15 PM
  4. Modify Dynamic Block Properties within a Table Cell
    By ccowgill in forum AutoCAD Tables
    Replies: 2
    Last Post: 2008-05-22, 05:15 PM
  5. AutoCAD Table with Dynamic Block properties causes errors in drawing
    By pbrumberg in forum Dynamic Blocks - Technical
    Replies: 1
    Last Post: 2007-03-15, 08:06 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •