Results 1 to 7 of 7

Thread: Error: Automation Error. Description was not provided

  1. #1
    Member
    Join Date
    2006-02
    Posts
    4
    Login to Give a bone
    0

    Default Error: Automation Error. Description was not provided

    Hi All,

    I was wondering if anyone has seen this before; I am trying to put a selected object behind all objects in the drawing by doing the following;

    Code:
    (setq doc (vla-get-activedocument (vlax-get-acad-object)))
    (setq space (vla-get-activelayout doc))
    (setq extdict (vla-getextensiondictionary (vla-get-block space)))
    (if (vl-catch-all-error-p
    (setq sorttbl (vl-catch-all-apply 'vla-Item (list extdict "ACAD_SORTENTS"))))
    (setq sorttbl (vla-AddObject extdict "ACAD_SORTENTS" "AcDbSortentsTable")));if
    (setq ent (vlax-ename->vla-object (ssname selectedObj 0)))
    (vlax-invoke sorttbl 'movetobottom (list ent))
    .........

    It works as long as I launch AutoCAD first and then open the drawing! If I double click on the drawing in Explorer (or any other programs that use the dwg file association...) the program will give me the following error : "; error: Automation Error. Description was not provided."

    I am totally lost!! Any help will be very much appreciated!!!
    Thanks!
    -Rick-
    Last edited by Opie; 2007-05-02 at 09:59 PM. Reason: [CODE] tags added

  2. #2
    AUGI Addict kennet.sjoberg's Avatar
    Join Date
    2002-05
    Posts
    1,707
    Login to Give a bone
    0

    Default Re: Error: Automation Error. Description was not provided

    Try to load (vl-load-com)

    : ) Happy Computing !

    kennet

  3. #3
    Member
    Join Date
    2006-02
    Posts
    4
    Login to Give a bone
    0

    Unhappy Re: Error: Automation Error. Description was not provided

    I did! Like I said it works when I launch AutoCAd first and open up a drawing but it won't work if I call up the drawing by double clicking on Explorer (DDE)!

    I have also tried to launch AutoCAD from Start->Run->"C:Program Files\AutoCAD 2006\acad.exe" (open the drawing after) and it works. But if I do Start->Run->"C:ProgramFiles\AutoCAD 2006\acad.exe c:test.dwg", it gave me that error!
    Last edited by rick.so; 2007-04-05 at 11:16 AM.

  4. #4
    Member
    Join Date
    2006-02
    Posts
    4
    Login to Give a bone
    0

    Default Re: Error: Automation Error. Description was not provided

    Anyone??? Anything that can point us to the right direction will be really appreciated!!

    -Rick-

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

    Default Re: Error: Automation Error. Description was not provided

    Quote Originally Posted by rick.so
    Anyone??? Anything that can point us to the right direction will be really appreciated!!

    -Rick-
    hope that will be the right direction..

    Code:
    (vl-load-com)
    (setq	adoc (vla-get-activedocument
    	       (vlax-get-acad-object)
    	     )
      )
      (if (and
    	(= (getvar "tilemode") 0)
    	(= (getvar "cvport") 1)
          )
        (setq acsp (vla-get-paperspace adoc))
        (setq acsp (vla-get-modelspace adoc))
      )		       
    (setq selectedObj (ssget "+.:S:E:N" (list (cons 0 "HATCH"))));<-- change to your suit
    (setq extdict (vla-getextensiondictionary acsp));<--fixed
    (if (vl-catch-all-error-p
    (setq sorttbl (vl-catch-all-apply 'vla-Item (list extdict "ACAD_SORTENTS"))))
    (setq sorttbl (vla-AddObject extdict "ACAD_SORTENTS" "AcDbSortentsTable")));if
    (setq ent (vlax-ename->vla-object (ssname selectedObj 0)))
    (vlax-invoke sorttbl 'MoveToBottom (list ent))
    ;These methods was working for me too
    ;(vlax-invoke sorttbl 'MoveToTop (list ent))
    ;(vlax-invoke sorttbl 'MoveBelow (list ent))
    ;(vlax-invoke sorttbl 'MoveAbove (list ent))

  6. #6
    All AUGI, all the time
    Join Date
    2015-12
    Location
    Central Oregon
    Posts
    591
    Login to Give a bone
    0

    Default Re: Error: Automation Error. Description was not provided

    Quote Originally Posted by rick.so
    Anyone??? Anything that can point us to the right direction will be really appreciated!!
    -Rick-
    Don't double-click a DWG in Explorer?

    How is this code being run? At startup?

    I just opened a 2008 drawing by dbl-clicking in Explorer, pasting your code and it appears to work just fine. So more information is needed, like maybe the entire routine that this code snip is from, and the version of Acad.
    Last edited by Jeff_M; 2007-04-17 at 09:26 PM.

  7. #7
    Member
    Join Date
    2006-02
    Posts
    4
    Login to Give a bone
    0

    Default Re: Error: Automation Error. Description was not provided

    Thank You All for your suggestions!

    It turns out that the code is fine and AutoCAD 2006 is running ok as well. The reason that there is an error when we launch any drawings through DDE (double clicking on Explorer)is because we have a 3rd party software that integrated into AutoCAD and somehow it has mess up the ARX libraries (don't know which one yet, still working on it). If I uninstall the 3rd party software, I have no problem running the code (DDE or not).

    Once again, thank you all for all your help and suggestions.

    BTW, the code was design to run as a reactor function for the plot command.

    Happy coding!

    -Rick-

Similar Threads

  1. Replies: 9
    Last Post: 2015-05-07, 10:35 PM
  2. Automation Error
    By baustin in forum AutoLISP
    Replies: 1
    Last Post: 2010-02-25, 11:19 PM
  3. Replies: 2
    Last Post: 2009-09-17, 01:53 PM
  4. Automation Error Help
    By CADdancer in forum AutoLISP
    Replies: 13
    Last Post: 2009-01-14, 12:38 AM
  5. Replies: 7
    Last Post: 2006-11-03, 07:43 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
  •