Results 1 to 3 of 3

Thread: Getting attribute's value and using it in an new block

  1. #1
    Member
    Join Date
    2013-02
    Posts
    31
    Login to Give a bone
    0

    Default Getting attribute's value and using it in an new block

    Hello,

    i'm trying to create a function for changing of a block with attributes.
    The steps / flowchart i'm using is:

    1. Make a filter which filters on a specific block
    2. Get the values of all the attributes of the filterd block.
    3. Save the values.
    4. Delete the filterd block.
    5. Purge the drawing
    6. creating the new block
    7. fill the attributes with the values from point 2

    This is a part of the flowchart. The numbers 1-3-4-5-6 i have already made, but i am stuck on number 2 and 7.

    Does someone know how i can create this?

    Greetings, Ukemi

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

    Default Re: Getting attribute's value and using it in an new block

    Quote Originally Posted by ukemi72362725 View Post
    ... i am stuck on number 2 and 7.
    You'll need to iterate your BlockReference Object's AttributeCollection Property Object, opening each ObjectId as AttributeReference ForRead, using your Transaction, subsequently opening each ObjectId in your destination BlockReference Object's AttributeCollection Property Object as AttributeReference ForWrite, populating the corresponding TextString Property accordingly.

    Here's an article Kean wrote on the topic that may be helpful:

    http://through-the-interface.typepad...g_autocad.html

    Cheers
    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3620, Core i7-7700K 4.2GHz, 64GB RAM, Samsung 970 Pro M.2, 8GB NVIDIA Quadro P4000

  3. #3
    AUGI Addict fixo's Avatar
    Join Date
    2005-05
    Location
    Pietari, Venäjä
    Posts
    1,269
    Login to Give a bone
    0

    Default Re: Getting attribute's value and using it in an new block

    "The whole problem with the world is that fools and fanatics are always
    so certain of themselves, and wiser people so full of doubts."
    Bertrand Russell

Similar Threads

  1. How to change dynamic block attribute default values based on block selected?
    By zeirz109180 in forum Dynamic Blocks - Technical
    Replies: 2
    Last Post: 2013-12-13, 02:20 PM
  2. Replies: 13
    Last Post: 2012-09-18, 07:51 PM
  3. Copy previous Block Attribute Value to next Block Attribute
    By CADfunk MC in forum VBA/COM Interop
    Replies: 8
    Last Post: 2009-02-27, 09:46 PM
  4. Block attribute text size is incorrect when the Block is not selected
    By lwhitney.133796 in forum AutoCAD General
    Replies: 3
    Last Post: 2007-02-16, 10:01 PM
  5. Block Attribute Manager Vs. Enhanced Attribute Editor
    By zoomharis in forum AutoCAD General
    Replies: 0
    Last Post: 2006-04-15, 11:53 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
  •