TheSwamp
Code Red => VB(A) => Topic started by: MSTG007 on April 29, 2014, 01:21:52 PM
-
How can I modify the following code to have the file always open up in Read Only oppose to write mode. The file I have is a master template that will keep getting updated.
Public Graphics As AcadApplication
Public Sub Loadtemplate(control As IRibbonControl)
Dim strDrawing As String
On Error Resume Next
Set Graphics = GetObject(, "AutoCAD.Application")
If Err.Description > vbNullString Then
Err.Clear
Set Graphics = CreateObject("AutoCAD.Application")
End If
strDrawing = "c:\temp\master.dwg"
Graphics.Documents.Open (strDrawing)
On Error GoTo 0
End Sub
Thanks for the help!!!!
-
Try
Graphics.Documents.Open strDrawing, true
-
Works! Thank you.