assign a variable value to an attribute tag

Discussion in 'AutoCAD' started by perriwinkle, Jan 5, 2005.

  1. perriwinkle

    perriwinkle Guest

    How do I assign a variable like count to an attribute in a block. For instance I want to count all doors in a drawing and put that total in a schedule. The doors have hardware so when I find a door of type A it gets 2 hinges and 1 knob. All of this info needs to land in a schedule, but I need totals sooo if I find 2 doors I have 4 hinges and 2 knobs... Because the schedule is a moving target, I decided to make it a block with attributes but now I don't know how to get the variable values assigned to the attribute.
     
    perriwinkle, Jan 5, 2005
    #1
  2. perriwinkle

    ECCAD Guest

    Perriwinkle,
    You may have to post any code you have now,,so we can
    respond. Stuffing an attribute is relatively easy, once you
    cycle through a block, get the attribute entity.

    Bob
     
    ECCAD, Jan 6, 2005
    #2
  3. perriwinkle

    Doug Guest

    I hope that I'm wrong in my opinion that what you want isn't possible. I've
    been looking for ways to do it too. The only thing I"ve found is to extract
    the attributes and add them up in Excel. I use ATTOUT and import the text
    file into Excel.
    You can probably write a LISP program that will check for the existence of
    your block, find the highest existing count, and then add another. But
    that's not really putting a variable into an attribute.

    DougVL

    instance I want to count all doors in a drawing and put that total in a
    schedule. The doors have hardware so when I find a door of type A it gets 2
    hinges and 1 knob. All of this info needs to land in a schedule, but I need
    totals sooo if I find 2 doors I have 4 hinges and 2 knobs... Because the
    schedule is a moving target, I decided to make it a block with attributes
    but now I don't know how to get the variable values assigned to the
    attribute.
     
    Doug, Jan 6, 2005
    #3
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.