Hi all.
i want to check if my file is saved or not. (already named). I need to do this for launch the command "-etransmit"
but i dont know how to do that.
No global var and found nothing here.
Thanks for your help.
Solved! Go to Solution.
Solved by mzakiralam. Go to Solution.
Hi,
I think a combination of "DWGTITLED" and "DBMOD" system variables should provide you the information needed to etransmit or to not etransmit.
Gaston Nunez
If you check 'DBMOD' system variable, you can get the drawing modification status. Below is the sample code to check if drawing has been saved or not.
Imports Autodesk.AutoCAD.ApplicationServices Imports Autodesk.AutoCAD.DatabaseServices Imports Autodesk.AutoCAD.Runtime <CommandMethod("DrawingSaved")> _ Public Sub DrawingSaved() Dim obj As Object = Application.GetSystemVariable("DBMOD") '' Check the value of DBMOD, if 0 then the drawing has not been changed If Not (System.Convert.ToInt16(obj) = 0) Then If MsgBox("Do you wish to save this drawing?", _
MsgBoxStyle.YesNo, _
"Save Drawing") = MsgBoxResult.Yes Then Dim acDoc As Document = Application.DocumentManager.MdiActiveDocument
acDoc.Database.SaveAs(acDoc.Name, True, DwgVersion.Current, _
acDoc.Database.SecurityParameters) End If End If End Sub
You can find details about DBMOD variable in below location: