[VB.NET] Disable SAVE Dialog ?

[VB.NET] Disable SAVE Dialog ?

Anonymous
Not applicable
692 Views
4 Replies
Message 1 of 5

[VB.NET] Disable SAVE Dialog ?

Anonymous
Not applicable
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?
0 Likes
693 Views
4 Replies
Replies (4)
Message 2 of 5

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


--
Ed
--


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
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?

0 Likes
Message 3 of 5

Anonymous
Not applicable
Are you trying not get the saveas prompt when
closing docs via VB/VBA?

 

or am I missing this comletely?

 

Andy


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
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?

0 Likes
Message 4 of 5

Anonymous
Not applicable
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
0 Likes
Message 5 of 5

Anonymous
Not applicable
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
--


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
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

0 Likes