Iterating through Documents w/ Form

Discussion in 'AutoCAD' started by Martin Schmid, Sep 14, 2004.

  1. This code doesn't quite work as expected... after each document, I have to
    hit the Close button before it Activates the next document, and updates the
    frmXrefColors form as required.

    Using .Hide after the Show doesn't help... I actually need to Close the
    dialog for it to move on correctly... any ideas?

    Dim Document As AcadDocument


    For Each Document In Documents
    Document.Activate
    Set xrc = New frmXrefColors
    frmXrefColors.Show
    Next
     
    Martin Schmid, Sep 14, 2004
    #1
  2. Martin Schmid

    Norman Yuan Guest

    What is the purpose to show a dialog box(form, it is dialogbox in Acad, by
    default) during the loop? Naturally, you expected user to see something on
    the dialog box and react accordingly, thus, you need to close it to continue
    the loop.

    Alternatively, you can show the form first, and start the loop by user
    clicking a button on the form. Since the action is executed by the form, the
    loop can go through. You can also update a label on the form to indicate
    what document the loop is at (or place a progress bar...).
     
    Norman Yuan, Sep 14, 2004
    #2
  3. Skeleton code wise, I'm doing this..

    I have defined a dialog with a ListBox
    For each document, show the ListBox populated w/ the attached xref names
    While box is shown, user can do stuff to the xrefs
    Next
     
    Martin Schmid, Sep 14, 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.