SDI mode

Discussion in 'AutoCAD' started by Jade, Jun 2, 2004.

  1. Jade

    Jade Guest

    Hi

    I have a VBA routine that Saves Alland Closes All opened drawings.

    The only thing is it switches the SDI to 0 I am not sure how to switch it
    back..... to SDI 1 in the code.

    any suggestions?.....

    Thanks

    J


    Public Sub MultiFile()
    If ThisDrawing.GetVariable("SDI") = False Then ' User is in muti doc mode
    If ThisDrawing.Application.Documents.Count > 1 Then ' User has more
    than 1 doc open
    ' Check for ANY unsaved document
    Dim myDWG As AcadDocument
    Dim IsUnsaved As Boolean
    IsUnsaved = False
    For Each myDWG In ThisDrawing.Application.Documents
    If myDWG.Saved = False Then
    ' Found one unsaved document. That's all we need to know.
    IsUnsaved = True
    Exit For
    End If
    Next
    ' Present multifile to user for disposition of drawings.
    If IsUnsaved = True Then frmMFile.Show
    End If
    End If

    End Sub
     
    Jade, Jun 2, 2004
    #1
  2. Simply

    ThisDrawing.SetVariable "SDI", 0

    or

    ThisDrawing.SetVariable "SDI", 1

    Gilles Plante
     
    Gilles Plante, Jun 2, 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.