Results 1 to 5 of 5

Thread: attribute information to Leader

  1. #1
    Member
    Join Date
    2017-03
    Posts
    2
    Login to Give a bone
    0

    Default attribute information to Leader

    Hello,

    I need help with a lisp routine to make a leader that reads the information from a block. It's a screw with information. The TAG changes everytime when the length changes. I need the "Default" text from the attribute.
    The text above the screw is now vissible but that's just for the test. (i make it invisble later)

    I have a lot of screws who are build at the same way so it would be nice if it's possible with this way the blocks are build.

    With kind regards,
    Ronald
    Attached Files Attached Files

  2. #2
    I could stop if I wanted to
    Join Date
    2005-06
    Location
    CORDOBA-ARGENTINA
    Posts
    275
    Login to Give a bone
    0

    Default Re: attribute information to Leader

    Hi , I start to work on your dwg, the first I noticed it is an anonymous block , seem to be you copy from one inserted.

    If I insert a new one, it will not set its length as the attribute , please send me a dwg with a few inserted, not copy , and different length .
    Attached Files Attached Files

  3. #3
    Member
    Join Date
    2017-03
    Posts
    2
    Login to Give a bone
    0

    Default Re: attribute information to Leader

    When i open my own drawing i see the name off the block is "Plaatschroef BCTX4.8 RVSneo" it's a new block with a name not an anonymous block. In the pulldown menu the length of the screw changes.
    So i don't know what go's wrong when you open the drawing. When i open your drawing the Original screw has a new name "U2" which i can't open. When i insert a new block name "Plaatschroef BCTX4.8 RVSneo" the screw length works again.

  4. #4
    I could stop if I wanted to
    Join Date
    2005-06
    Location
    CORDOBA-ARGENTINA
    Posts
    275
    Login to Give a bone
    0

    Default Re: attribute information to Leader

    Follow the Entget from your block reference at the

    ((-1 . <Entity name: 33397b50>) (0 . "INSERT") (5 . "1E4AD") (102 . "{ACAD_XDICTIONARY") (360 . <Entity name: 33397b60>) (102 . "}") (102 . "{ACAD_REACTORS") (330 . <Entity name: 33397e20>) (102 . "}") (330 . <Entity name: 333a29f0>) (100 . "AcDbEntity") (67 . 0) (410 . "Model") (8 . "0") (100 . "AcDbBlockReference") (66 . 1) (2 . "*U2") (10 157.919 151.878 0.0) (41 . 1.0) (42 . 1.0) (43 . 1.0) (50 . 0.0) (70 . 0) (71 . 0) (44 . 0.0) (45 . 0.0) (210 0.0 0.0 1.0))
    DXF code 2 , mean the block name (2 . "*U2")

  5. #5
    All AUGI, all the time
    Join Date
    2003-07
    Posts
    555
    Login to Give a bone
    0

    Default Re: attribute information to Leader

    The simple answer is its a DYNAMIC block not a normal block. Try this it will return the current value of "Visibilty1" if you stretch the block and just paste last line it will reflect the block changing.

    Code:
    ; Code by www.Lee-mac.com get dynamic block property
    (defun LM:getdynpropvalue ( blk prp )
    (setq prp (strcase prp))
    (vl-some '(lambda ( x ) (if (= prp (strcase (vla-get-propertyname x))) (vlax-get x 'value)))
    (vlax-invoke blk 'getdynamicblockproperties)
    )
    )
    
    (setq obj (vlax-ename->vla-object (car (entsel "\nPick a block"))))
    ;(setq val (LM:getdynpropvalue  obj "Visibility1" ))
    (alert (strcat "Id is = "  (LM:getdynpropvalue  obj "Visibility1" )))

Similar Threads

  1. Attribute or Property Information of XREFS
    By autocad.wishlist1734 in forum AutoCAD Wish List
    Replies: 2
    Last Post: 2014-08-28, 04:29 PM
  2. Replies: 2
    Last Post: 2007-02-20, 09:16 PM
  3. Extracting Attribute Information
    By stephen.coff in forum AutoLISP
    Replies: 2
    Last Post: 2006-11-19, 09:07 PM
  4. Created BOM from attribute information
    By brooks_mike_ in forum AutoLISP
    Replies: 2
    Last Post: 2006-11-07, 06:51 PM
  5. Extracting attribute information
    By martin.young.78402 in forum AutoCAD Customization
    Replies: 2
    Last Post: 2005-02-28, 08:56 AM

Posting Permissions

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