Results 1 to 2 of 2

Thread: eAlreadyInDb error that I can't seem to figure out.

  1. #1
    All AUGI, all the time
    Join Date
    2003-10
    Posts
    706
    Login to Give a bone
    0

    Default eAlreadyInDb error that I can't seem to figure out.

    What causes the eAlreadyInDb error? I have a transaction that iterates through a selection set and when it finds a polyline it creates another transaction that adds a text object at the polyline. Each transaction is "commited" and both are wrapped inside a Using---End Using. If I only select one polyline it works great but as soon as two or more are in the selection set it throws the eAlreadyInDb error. Am I not closing something? I thought by adding Using---End Using to each transaction it would close it and move on to the next polyline in the selection set and then open the blocktablerecord again for write. What am I doing wrong?

  2. #2
    All AUGI, all the time
    Join Date
    2003-10
    Posts
    706
    Login to Give a bone
    0

    Default Re: eAlreadyInDb error that I can't seem to figure out.

    I just posted this question 10 minutes ago and then figured out what was going on so I decided to reply with my own solution....
    Turns out, I was setting up the text object way up at the top of my code (Dim Areaatextobj As DBText = New DBText) and then I was trying to build this text object and add it to the database over and over again with each polyline that it found in the selection set. All I had to do is move this piece of code into the inside of the selection set iteration so it would set up a new text object with every polyline that it finds. Something so simple has been driving me crazy for weeks. Oh well... it works now.

Similar Threads

  1. Replies: 12
    Last Post: 2014-10-10, 01:01 PM
  2. I cannot figure this out
    By Mark Northrup in forum Revit MEP - General
    Replies: 2
    Last Post: 2011-05-02, 08:55 PM
  3. Set Figure Label Styles in the Figure Prefix Database
    By civil3d.wishlist1941 in forum Civil 3D Wish List
    Replies: 0
    Last Post: 2008-01-09, 09:38 PM
  4. can someone help me figure this out
    By eleonard in forum AutoLISP
    Replies: 1
    Last Post: 2005-11-22, 12:27 AM
  5. error message and I can't figure it out.
    By eleonard in forum AutoLISP
    Replies: 5
    Last Post: 2005-08-29, 11:17 PM

Posting Permissions

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