VLAX error confusing.

Discussion in 'AutoCAD' started by BillZ, Dec 17, 2004.

  1. BillZ

    BillZ Guest

    R2005:

    I have an error trying to AddEllipse.

    I ran it from the vlide with no help on what exactly is wrong.

    ; error: Automation Error. Description was not provided.

    (setq MaAxLen (vlax-make-variant ds1 vlax-vbDouble))
    (vlax-invoke-method (list *modelspace* 'AddEllipse (vlax-3d-point pt1) MaAxLen rt)

    So i run it form the command prompt:

    Command: ; error: Automation Error. Description was not provided.

    So after reading the help files and searching this forum, it seems to me I need to add a catch-all error to help discipher this generic error, so I add to program.

    (setq ErrMsg (vl-catch-all-apply
    'vlax-invoke-method (list *modelspace* 'AddEllipse (vlax-3d-point pt1) MaAxLen rt)
    ))

    (if (vl-catch-all-error-p ErrMsg)
    (prompt (strcat "Exception: " (vl-catch-all-error-message ErrMsg)))
    )

    Now I run the program again I get:

    Coomand: Exception: Automation Error. Description was not provided.

    Can I get some help for this?

    TIA

    Bill
     
    BillZ, Dec 17, 2004
    #1
  2. The MajorAxis argument needs to be a point, not a simple double. See the
    example in the docs and not just the incorrect description.

    --
    R. Robert Bell


    R2005:

    I have an error trying to AddEllipse.

    I ran it from the vlide with no help on what exactly is wrong.

    ; error: Automation Error. Description was not provided.

    (setq MaAxLen (vlax-make-variant ds1 vlax-vbDouble))
    (vlax-invoke-method (list *modelspace* 'AddEllipse (vlax-3d-point pt1)
    MaAxLen rt)

    So i run it form the command prompt:

    Command: ; error: Automation Error. Description was not provided.

    So after reading the help files and searching this forum, it seems to me I
    need to add a catch-all error to help discipher this generic error, so I add
    to program.

    (setq ErrMsg (vl-catch-all-apply
    'vlax-invoke-method (list *modelspace* 'AddEllipse (vlax-3d-point pt1)
    MaAxLen rt)
    ))

    (if (vl-catch-all-error-p ErrMsg)
    (prompt (strcat "Exception: " (vl-catch-all-error-message ErrMsg)))
    )

    Now I run the program again I get:

    Coomand: Exception: Automation Error. Description was not provided.

    Can I get some help for this?

    TIA

    Bill
     
    R. Robert Bell, Dec 17, 2004
    #2
  3. BillZ

    BillZ Guest

    See the
    example in the docs and not just the incorrect description.<<<

    that did it.

    Thanks

    Bill
     
    BillZ, Dec 17, 2004
    #3
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.