stack overflow?

Discussion in 'AutoCAD' started by Guest, Sep 15, 2004.

  1. Guest

    Guest Guest

    I am writing dialogs to access our layer standards. So far, I have separate
    forms for "detail" layers, "annotation" layers and "demolition" layers. We
    are using a variation of the AIA layer standards. For example, an
    annotation layer can have a name like "n-a-anno-note". The form lets the
    user select a value for the first field ["n" for new, "e" for existing], a
    value for the second field ["g" for general, "a" for architectural, "c" for
    civil], the third field is "anno" by default and a value for the last field
    [note, patt, symb, dims, iden]. I can run each of these forms and they work
    as expected.

    I also have a form that has three buttons - one for each of the different
    layer sets described above. When I use this to access any of the three
    individual forms, the desired form appears but my first selection anywhere
    in that form produces the following:


    Run-time error '28':

    Out of stack space


    My programming idea for any selection to set a field in the layer name is to
    set the .Value of all selections of that group to False and then set the one
    picked to True.


    Here is the code for the "Annotation" selection from the first dialog that
    can call any of the three individual dialogs:

    ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
    ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
    Private Sub cmdAnno_Click()
    frmLayMan_00.Hide
    frmLayAnno.Show
    End Sub
    ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
    ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

    Here is the code that is run when I pick the checkbox for "new":

    ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
    ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
    Public Sub chkStatusNew_Click()
    Static strLayerStatus As String
    Static strLayerDisc As String
    Static strLayerUsage As String
    Static intLayerField As Integer
    intLayerField = 0

    If chkStatusNew.Value = True Then
    chkStatusNil ''' THIS IS WHERE THE PROBLEM OCCURS
    chkStatusNew.Value = True
    strLayerStatus = "n-"
    Else
    strLayerStatus = "_-"
    End If

    Call strLayerName(strLayerStatus, strLayerDisc, strLayerUsage,
    intLayerField)
    End Sub

    ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
    ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

    And finally, here is the code of chkStatusNil, the stumbling block that
    triggers the stack overflow:
    ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
    ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
    Private Sub chkStatusNil()
    chkStatusNew.Value = False
    chkStatusExisting.Value = False
    End Sub
    ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
    ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''


    It doesn't matter which of the three layer groups are selected or what is
    selected from the field options, they all give up when reaching the same
    stage. I have tried Public/Private without any luck. I am still learning
    and stumped...


    Any ideas? thanks - chris
     
    Guest, Sep 15, 2004
    #1
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.