[VB.NET] Disable SAVE Dialog ?

Discussion in 'AutoCAD' started by willem, Aug 4, 2003.

  1. willem

    willem Guest

    Hi,

    I have a VB.NET application that I'm writing, and I want to disable the saveas dialog.
    Simply I can set FILEDIA to 0, but then all dialogs with files are not shown. So i need e.d. when saveas is chosen disable this and after saving, enable it.

    But on my beginCommand it's too late to disable filedia, because this is then fired after the saveas result.

    Is there another way to do this in VB.NET?
     
    willem, Aug 4, 2003
    #1
  2. willem

    Ed Jobe Guest

    Have you thought about redefining the Saveas command to use yours instead?




    --
    Ed
    --




    "willem" <> wrote in message news:...

    Hi,

    I have a VB.NET application that I'm writing, and I want to disable the saveas dialog.
    Simply I can set FILEDIA to 0, but then all dialogs with files are not shown. So i need e.d. when saveas is chosen disable this and after saving, enable it.

    But on my beginCommand it's too late to disable filedia, because this is then fired after the saveas result.

    Is there another way to do this in VB.NET?
     
    Ed Jobe, Aug 4, 2003
    #2
  3. Are you trying not get the saveas prompt when closing docs via VB/VBA?



     



    or am I missing this comletely?



     



    Andy



    "willem" <> wrote in message news:...

    Hi,

    I have a VB.NET application that I'm writing, and I want to disable the saveas dialog.
    Simply I can set FILEDIA to 0, but then all dialogs with files are not shown. So i need e.d. when saveas is chosen disable this and after saving, enable it.

    But on my beginCommand it's too late to disable filedia, because this is then fired after the saveas result.

    Is there another way to do this in VB.NET?
     
    Andrew Elmore, Aug 4, 2003
    #3
  4. willem

    Ed Jobe Guest

    You just don't have your defun doing anything. Try this.



     



    ThisDrawing.SendCommand("(defun C:Saveas () (princ ""This command has been redefined."")(princ))" & vbCr)





    --
    Ed
    --




    "willemschwarte" <> wrote in message news:...

    Well, I tried this (see below), it's in the EndOpen event, since the drawings are opened thru my app. But, Only the UNDEFINE sendcommand works, the defun command is ignored. When I type the defun command in ACAD's command line, it works, so it's almost like these commands can't be executed thru my vb app.?



    Private Sub myAutoCadApp_EndOpen(ByVal FileName As String) Handles myAutoCadApp.EndOpen

    myAutoCadApp.ActiveDocument.SendCommand("UNDEFINE" & vbTab & "SAVEAS" & vbCr)
       myAutoCadApp.ActiveDocument.SendCommand("(defun C:SAVEAS () ())" & vbCr)

    End Sub
     
    Ed Jobe, Aug 5, 2003
    #4
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.