Arin9916 发表于 2022-7-6 09:21:56

How to open thefile read-only

hi ^^ i wondering how can i open the file(read-only) using lisp.
can it possible?

Tharwat 发表于 2022-7-6 09:40:00

Yes it is possible .
 
Write the File Path of your desired drawing instead of the one that I attached .
 

(vl-load-com)(defun c:Test nil (vla-open (vla-get-documents (vlax-get-acad-object))         "C:\\Users\\TOUCHMATE\\Desktop\\My Drawing.dwg"         :vlax-true ))
 
Tharwat

Arin9916 发表于 2022-7-6 09:47:02

wow...you great!!! thanks ^^

Tharwat 发表于 2022-7-6 10:02:08

 
You're welcome Arin
 
Tharwat

Arin9916 发表于 2022-7-6 10:14:29

I USE THIS SOURCE THAT SCRIPT. FOR EXAMPLE
 
"
(vla-open (vla-get-documents (vlax-get-acad-object))
"C:\\a.dwg"
            :vlax-true
)
CIRCLE
0,0
100,100
CLOSE
(vla-open (vla-get-documents (vlax-get-acad-object))
"C:\\B.dwg"
            :vlax-true
)
CIRCLE
.
.
.
 
BUT IT DO NOT WORK   T_T
 
I want make plot lisp using script and lisp
but if file already open , script error..
so i want file open(readonly) then plot and close without save.
 
lisp is so hardT T

Tharwat 发表于 2022-7-6 10:32:41

You are using Lisp for such a useless things , why do not you open the file normally and after that run your scripts without including the vl codes
in that script file .
 
And why you are blaming codes since your script file rejecting the status of read only drawing ?
页: [1]
查看完整版本: How to open thefile read-only