TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: RolandOrzabal on January 24, 2013, 11:51:02 PM

Title: XOPEN file in Read-Only
Post by: RolandOrzabal on January 24, 2013, 11:51:02 PM

Hi swampers...

i often work in a group and there's always an instance where in i need to open other's drawing using XOPEN but i need it to be read-only as to avoid editing / saving the drawing which is not mine and that the owner of that drawing can still open his drawing and edit it if he wants...

 Is there a way that i can use XOPEN and that the file being opened  will be on read-only mode?
Title: Re: XOPEN file in Read-Only
Post by: irneb on January 25, 2013, 12:43:01 AM
I don't think the XOpen command has a ReadOnly option.

Does your code already "know" the xref's entity/name/path? If not there are various ways to get it.

Once you have the path to the xref you could use the ActiveX Documents Collection (http://entercad.ru/acadauto.en/index.html?page=idh_documents_collection.htm)'s Open (http://entercad.ru/acadauto.en/index.html?page=idh_open.htm) method. Note it has a readonly parameter.
Title: Re: XOPEN file in Read-Only
Post by: BlackBox on January 25, 2013, 08:51:33 AM
Once you have the path to the xref you could use the ActiveX Documents Collection (http://entercad.ru/acadauto.en/index.html?page=idh_documents_collection.htm)'s Open (http://entercad.ru/acadauto.en/index.html?page=idh_open.htm) method. Note it has a readonly parameter.

Here's an old example (http://www.cadtutor.net/forum/showthread.php?62376-Writing-a-script-to-open-a-bunch-of-drawings-read-only...&p=425079&viewfull=1#post425079).
Title: Re: XOPEN file in Read-Only
Post by: Randall Culp on January 10, 2017, 08:10:26 PM
"BUMP"

Anyone have anything that will trip XOPEN to read-only?? 

Or failing that a reactor of some kind that can redefine XOPEN to copy the selected XREF to a local junk directory and open it there??