With SDI set to 0, when I run the following, the drawing is opened as read-only.... ThisDrawing.Application.Documents.Open "z:\mw\test.dwg", True With SDI set to 1, the help file says... When working in SDI mode, use the Open method from the Document object. ThisDrawing.Open "z:\mw\test.dwg" The drawing opens but not READ-ONLY. I'm sure it's something that I'm doing, or NOT doing... after all, it is getting late. My goal is to open the drawing as read-only when SDI is set to 1. Thanks in advance.
Joe: It doesn't work. With SDI set to 1, I get a "Object doesn't support this property or method" error message. For what it's worth, I'm using 2005. -- Matt W The difference between genius and stupidity is that genius has its limits. | Application.Documents.Open "<Filename path", True | | Joe | -- | | | > With SDI set to 0, when I run the following, the drawing is opened as | > read-only.... | > ThisDrawing.Application.Documents.Open "z:\mw\test.dwg", True | > | > With SDI set to 1, the help file says... | > When working in SDI mode, use the Open method from the Document object. | > ThisDrawing.Open "z:\mw\test.dwg" | > | > The drawing opens but not READ-ONLY. | > | > I'm sure it's something that I'm doing, or NOT doing... after all, it is | > getting late. | > | > My goal is to open the drawing as read-only when SDI is set to 1. | > | > | > Thanks in advance. | > | > -- | > Matt W | > | > The difference between genius and stupidity is that genius has its limits. | > | > | |
Well, that's interesting... It didn't work the first time, but now it does. Maybe just a hiccup in the system?? Anyhoo... It DOES work, BUT..... when it opens the drawing, it isn't read-only. Why is that?? And how do I MAKE it read-only? Thanks in advance! Matt W The difference between genius and stupidity is that genius has its limits. | Joe: | It doesn't work. With SDI set to 1, I get a "Object doesn't support this | property or method" error message. | For what it's worth, I'm using 2005. | | -- | Matt W | | The difference between genius and stupidity is that genius has its limits. | | | Application.Documents.Open "<Filename path", True | | | | Joe | | -- | | | | | | > With SDI set to 0, when I run the following, the drawing is opened as | | > read-only.... | | > ThisDrawing.Application.Documents.Open "z:\mw\test.dwg", True | | > | | > With SDI set to 1, the help file says... | | > When working in SDI mode, use the Open method from the Document object. | | > ThisDrawing.Open "z:\mw\test.dwg" | | > | | > The drawing opens but not READ-ONLY. | | > | | > I'm sure it's something that I'm doing, or NOT doing... after all, it is | | > getting late. | | > | | > My goal is to open the drawing as read-only when SDI is set to 1. | | > | | > | | > Thanks in advance. | | > | | > -- | | > Matt W | | > | | > The difference between genius and stupidity is that genius has its | limits. | | > | | > | | | | | |
Matt, While in SDI, you are supposed to use the Open method from the Document object, not the Documents collection (according to the docs; that might be dated info). And the ReadOnly argument is not supported on the Document.Open method. So before you use the Open method, open the file for appending, then use the Open method, and close the file post-open. -- R. Robert Bell Well, that's interesting... It didn't work the first time, but now it does. Maybe just a hiccup in the system?? Anyhoo... It DOES work, BUT..... when it opens the drawing, it isn't read-only. Why is that?? And how do I MAKE it read-only? Thanks in advance!
Yeah... that's what I saw in the help file (*cough* "real men don''t read docs" *cough*) You lost me here. Mind elaborating on this one a bit?
Sub Test() Dim myFileN As String myFileN = "C:\Temp\~17IT.dwg" Open myFileN For Append Lock Write As #1 ThisDrawing.Open myFileN Close #1 End Sub -- R. Robert Bell Yeah... that's what I saw in the help file (*cough* "real men don''t read docs" *cough*) You lost me here. Mind elaborating on this one a bit?
Thanks, Robert! -- Matt W The difference between genius and stupidity is that genius has its limits. | Sub Test() | Dim myFileN As String | myFileN = "C:\Temp\~17IT.dwg" | Open myFileN For Append Lock Write As #1 | ThisDrawing.Open myFileN | Close #1 | End Sub | | | -- | R. Robert Bell | | | | Yeah... that's what I saw in the help file (*cough* "real men don''t read | docs" *cough*) | | > open the file for appending | You lost me here. Mind elaborating on this one a bit? | | -- | Matt W | | |