Visual Basic Customization

Reply
*montagne, michael
Message 1 of 3 (92 Views)

Open Read Only

92 Views, 2 Replies
10-18-1999 11:57 AM
I need to cycle through a collection of drawings and open them read-only in
order to print them The documentation shows a "ReadOnly" argument in the
"AcadDocument.Open" method. I can't seem to get this to work. Is there
another method to accomplish this?

-mjm
*Pierson, John
Message 2 of 3 (92 Views)

Re: Open Read Only

10-18-1999 02:27 PM in reply to: *montagne, michael
You could "cheat" a little. Just before opening the drawing open it as
Binary. Then after it's open, use the Close statement. The file is now
ReadOnly.

filenumber = FreeFile

Open MyFileName For Binary As filenumber

'open file here

Close filenumber

John Pierson

michael montagne wrote in message <7ufqcr$man26@adesknews2.autodesk.com>...
>I need to cycle through a collection of drawings and open them read-only in
>order to print them The documentation shows a "ReadOnly" argument in the
>"AcadDocument.Open" method. I can't seem to get this to work. Is there
>another method to accomplish this?
>
>-mjm
>
>
*montagne, michael
Message 3 of 3 (92 Views)

Re:

10-18-1999 03:55 PM in reply to: *montagne, michael
Ooo very sneaky....
I also discovered that the "ReadOnly option IS available is you have MDI
enable but not in SDI.
You have to use the open method from the documents collection.
-mjm

John Pierson wrote in message <7ug3m5$obi6@adesknews2.autodesk.com>...
>You could "cheat" a little. Just before opening the drawing open it as
>Binary. Then after it's open, use the Close statement. The file is now
>ReadOnly.
>
>filenumber = FreeFile
>
>Open MyFileName For Binary As filenumber
>
>'open file here
>
>Close filenumber
>
>John Pierson
>
>michael montagne wrote in message <7ufqcr$man26@adesknews2.autodesk.com>...
>>I need to cycle through a collection of drawings and open them read-only
in
>>order to print them The documentation shows a "ReadOnly" argument in the
>>"AcadDocument.Open" method. I can't seem to get this to work. Is there
>>another method to accomplish this?
>>
>>-mjm
>>
>>
>
>

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community