PDA

View Full Version : Read-only using Odbx


richardl
2004-06-10, 04:43 PM
I currently use this to open drawings using odbx:

(setq DBXOBJ (vla-GetInterfaceObject (vlax-get-acad-object) "ObjectDBX.AxDbDocument"))
(vla-open DBXOBJ filename)

but this opens the file in read/write access (so if the file is already opened it generates an error), is there a way to open a file for access using odbx in read-only mode ?

thanks to all

whdjr
2004-06-11, 03:00 PM
The short answer is no.

Sorry,

Ed Jobe
2004-06-11, 04:12 PM
The short answer is no, since by itself ObjectDbx only open dwg's that are not read-only. But the long answer is yes. I have a cls on the Exchange that handles this error by opening a temp file instead. It also handles dwt's in the same manner by opening a copy as a dwg. See EX001229 (http://64.227.78.21/empower/exchange/submissionpopup.asp?SubmissionNumber=EX001229)

richardl
2004-06-11, 04:18 PM
That is the work-around I found, I just tought there was another way.

Thanks

whdjr
2004-06-11, 05:32 PM
Sorry about giving my answer too hastily. I thought we were only talking about Lisp.

Ed Jobe
2004-06-11, 05:52 PM
Oops, I wasn't paying attention to what forum I was in. However, you can duplicate the same functionality in lisp.