Jump to content

How to open thefile read-only using lisp.


Arin9916

Recommended Posts

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))
           [b]"C:\\Users\\TOUCHMATE\\Desktop\\My Drawing.dwg"[/b]
           :vlax-true
 )
)

 

Tharwat

Link to comment
Share on other sites

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 hard T T

Link to comment
Share on other sites

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 ?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...