Intermittent error

Discussion in 'AutoCAD' started by Jon, Oct 27, 2004.

  1. Jon

    Jon Guest

    Hi All,
    I have a piece of code that always works when I step thru the code with F8,
    or F5 to break points. However, when running from the command line
    (vl-vbarun) it usually (not always) bombs out. The error description is
    "Expression too complex" but I can't seem to find where it is crashing. What
    should I be looking for in my obviously badly coded routine?

    A quick summary:
    collect all LDD points (722) in project
    throw to Type array
    Public Type surveypoint
    number As Long
    east As Double
    north As Double
    rl As Double
    code As String
    End Type
    scan thru all points looking for particular codes that match the text file
    library (26 lines of 5 variables, stored as single dimension type array)

    Any hints would be appreciated, especially on how to locate the source of
    the error in the code.

    Thanks,

    Jon
     
    Jon, Oct 27, 2004
    #1
  2. Jon

    wivory Guest

    I hate those "works when you trace it, doesn't when you don't" bugs! The best suggestion I can offer is to splatter the code with Debug.Print statements saying "About to do so-and-so" and when it crashes see where the most recent message was printed from. If you still can't figure it out after that, post us the failing bit of code.

    Regards

    Wayne Ivory
    IT Analyst Programmer
    Wespine Industries Pty Ltd
     
    wivory, Oct 28, 2004
    #2
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.