Lisp?

Discussion in 'AutoCAD' started by Yardz, Dec 30, 2005.

  1. Yardz

    Yardz Guest

    I am a Landscape Architect. I have a very large irrigation project that I
    need to add the total gallons per minute (gpm) of selected head (sprinkler)
    symbols. Each symbol has an attribute with the gpm value already. I want
    to make a selection of heads, add up all the values from the gpm attribute
    then take the total and update another block with that total. The block
    with the total gpm is a tag for the specific valve that is operating the
    heads. I would have to be able to select the particular valve tag to update
    in the middle of the operation.

    I have been using the Express tools export attribute information and opening
    in Excel then getting the sum then going back to Acad and manually updating
    the valve tag...very tedious...over 300 valves need to be done!

    Any ideas?
     
    Yardz, Dec 30, 2005
    #1
  2. Yardz

    Patrick Guest

    Yardz a écrit :
    It looks like you need a specific application LISP or VBA, I don't think
    a generic AutoCAD command or procedure would achieve that.
     
    Patrick, Dec 30, 2005
    #2
  3. Yardz

    Rob Guest

    I had similar problems with other tables I needed for my final construction
    documents. About 3 years ago I found this program that converts from ACAD
    to Excel and back again. http://www.CADAddOn.com/ You can d/l a free trial
    version that will work for 30 days. This is just a very simple and easy to
    use program.

    What I do now is create a block. Each block that has a unique value that I
    want Excel to associate to it is on a seperate layer. I can group many
    block or just one. Once in Excel, I can associate the blocks and layers to
    a numerical reference. Create a formula if needed and do the calculations.
    This then saves back to ACAD. Everytime I add a new block to the drawing,
    it updates the table. If I open the table again in Excel and then go back
    to ACAD, the table has all the new information contained. This is the
    fastest and easiest table or schedule builders I have found. Well worth the
    $.

    Good luck,
    -Rob
     
    Rob, Dec 31, 2005
    #3
  4. This is possible with a custom lisp routine. If you do this a lot it may be
    worth it to you to write it. After you learn how to write this one, you'll
    be on the look out for other ways to improve your productivity through lisp.
    Then you will write others, and wonder how you ever managed without this new
    skill set.
     
    Michael Bulatovich, Dec 31, 2005
    #4
  5. Yardz

    flixpeer Guest

    flixpeer, Jan 1, 2006
    #5
  6. Yardz

    Yardz Guest

    Thanks to everyone for responding...sorry I have not checked since I posted.

    I am going to check out the suggestions and will be back.

    Thanks again.
     
    Yardz, Jan 2, 2006
    #6
  7. Yardz

    Yardz Guest

    This lisp almost works. It is adding up the wrong attribute, then updating
    the wrong attribute in the target block.

    I need it to give the sum of the second attribute of the first block(s) then
    return that number to the second attribute of the target block.

    The first block has two attributes: model, gpm. The target block has three
    attributes: number, gpm, size. I need to be able to pick the first block
    (many at a time by any method and have the gpm's totaled and update the gpm
    attribute in the target block.

    What needs to be edited in the lisp below to achieve that?

    Thanks!
     
    Yardz, Jan 2, 2006
    #7
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.