Author Topic: Error message: 'error: Automation Error. Object was erased'  (Read 4032 times)

0 Members and 1 Guest are viewing this topic.

Matt__W

  • Seagull
  • Posts: 12955
  • I like my water diluted.
Error message: 'error: Automation Error. Object was erased'
« on: November 04, 2008, 09:07:28 AM »
So one of the users here is getting an error message I've never seen before.

Quote
error: Automation Error. Object was erased

What does it mean and what was erased??
Autodesk Expert Elite
Revit Subject Matter Expert (SME)
Owner/FAA sUAS Pilot @ http://skyviz.io

ronjonp

  • Needs a day job
  • Posts: 7529
Re: Error message: 'error: Automation Error. Object was erased'
« Reply #1 on: November 04, 2008, 09:54:52 AM »
Do you have stuff running in startup? I've seen this happen when unlocking all locked layers...purging the drawing..then trying to relock the layer list. One of the layers in the list gets purged and the routine bombs.

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

Matt__W

  • Seagull
  • Posts: 12955
  • I like my water diluted.
Re: Error message: 'error: Automation Error. Object was erased'
« Reply #2 on: November 04, 2008, 10:02:01 AM »
I have an ACAD.lsp that sets some sysvars, loads an updating program, loads another LSP to clean out junk files (.err, .dmp, .tmp) from the drawing's active directory, and loads a reactor for putting xrefs on a particular layer.

The user got the error message after AutoCAD was already opened.  He clicked on an icon and that message showed up at the command line.  He closed AutoCAD and the message came up again - it doesn't appear to have done anything harmful.
Autodesk Expert Elite
Revit Subject Matter Expert (SME)
Owner/FAA sUAS Pilot @ http://skyviz.io

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Error message: 'error: Automation Error. Object was erased'
« Reply #3 on: November 04, 2008, 11:11:39 AM »
It usually means the object that is trying to be modified has been erased, be it layer, line, arc, or whatever.  You could put a check into the code to make sure the item isn't erased 'vlax-erased-p' so that you won't get the error.  You can define a global error handler with '(vl-bt)' within it, so that you might be able to find the offending code quicker.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.