Jump to content

Automation Error No Description provided


M76

Recommended Posts

Sometimes I get this message when running a lisp. But i cannot find the cause, it doesn't even break the code, so I have no idea where to look for the error, or see what goes wrong.

 

Any way to force it to break the execution of the code? Or any idea what can cause this message to appear?

Link to comment
Share on other sites

It can be a number of things - using a method/property that doesn't apply for example.

 

You could use the Visual LISP Editor to Debug your code to see where the error occurs.

 

Visual LISP Editor:

http://www.afralisp.net/vl/vlisp.htm

http://www.afralisp.net/vl/vl-edit.htm

http://midpointcad.com/au/docs/lakose_The_Visual_LISP_Developers_Bible.pdf

Link to comment
Share on other sites

That's the problem, I'm using visual lisp editor, but the code execution is not stopped when the message appears. So when I select last break, it shows nothing.

Link to comment
Share on other sites

Could you not use a break-point (near to where you believe the error to be) and then animate to see where the code evaluation stops?

 

Else, post the code on here and I'll have a look :)

Link to comment
Share on other sites

I've figured it out, its not a problem with the code.

 

I'm offsetting polylines, and the error comes when the line can't be offset.

 

I'm using vla-offset, so how can I detect this, and avoid getting the message?

Link to comment
Share on other sites

I used that method in this code:

http://www.cadtutor.net/forum/showthread.php?t=42427

 

You can make use of vl-catch-all-apply to allow for when offsetting is not possible.

Link to comment
Share on other sites

  • 2 years later...

Hi all,

I am studying lisp, and i got an example in Help of Autocad 2008 (Developer documentation). That is:

(defun init-motivate ()  (vl-load-com)  (setq mspace     (vla-get-modelspace       (vla-get-activedocument (vlax-get-acad-object))     )  )  (vla-addray mspace (vlax-3d-point 0 0 0) (vlax-3d-point 1 1 0)))

and

(defun bnddrop (/ bbox)  (setq bbox (vla-getboundingbox           (vla-item mspace (- 1 (vla-get-count mspace)))           'll           'ur         )  )  (list "Do something with bounding box." bbox))

Ok, a Ray object is created, but (bnddrop) responsed an error that not like in its example (; error: Automation Error. Invalid extents).

Errors is "; error: Automation Error. Description was not provided."

Why is it? Thanks for helps!

Link to comment
Share on other sites

I see, but the error is not like "Invalid extents".

Error is "; error: Automation Error. Description was not provided."

Meaning of this, the error is responsed different from the error of Autodesk's example. Why? Thank you!

 

This is a report from Command line:

 

Command: c

CIRCLE Specify center point for circle or [3P/2P/Ttr (tan tan radius)]:

Specify radius of circle or [Diameter]:

Command: (defun init-motivate ()

(_> (vl-load-com)

(_> (setq mspace

((_> (vla-get-modelspace

(((_> (vla-get-activedocument (vlax-get-acad-object))

(((_> )

((_> )

(_> (vla-addray mspace (vlax-3d-point 0 0 0) (vlax-3d-point 1 1 0))

(_> )

INIT-MOTIVATE

 

Command: '_.zoom _e

Command: (defun bnddrop (/ bbox)

(_> (setq bbox (vla-getboundingbox

(((_> (vla-item mspace (- 1 (vla-get-count mspace)))

(((_> 'll

(((_> 'ur

(((_> )

((_> )

(_> (list "Do something with bounding box." bbox)

(_> )

BNDDROP

 

Command: (INIT-MOTIVATE)

#

 

Command: (BNDDROP)

; error: Automation Error. Description was not provided.

Link to comment
Share on other sites

Try:

(defun c:test ( / lowerleft upperright )
   (vla-getboundingbox
       (vla-addray
           (vla-get-modelspace (vla-get-activedocument (vlax-get-acad-object)))
           (vlax-3D-point 0.0 0.0)
           (vlax-3D-point 1.0 0.0)
       )
       'lowerleft 'upperright
   )
   (princ)
)
(vl-load-com) (princ)

PS: Please edit your post and enclose your code with code tags:

 

[highlight][noparse]

[/noparse][/highlight] Your code here [highlight][noparse]

[/noparse][/highlight]

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...