This may do the trick:
Regards,Code:(setq theDocsObj (vla-get-documents (vlax-get-acad-object))) (vla-activate (vla-open theDocsObj MyFileName :vlax-false MyPassword))
Mircea
Registered forum members do not see this ad.
CADTutorians,
Does anyone know whether it is possible to open a password protected drawing via Visual LISP, and for positive answer how?
Mehrdad Ahankhah مهرداد آهن خواه
www.IranCAD.com
This may do the trick:
Regards,Code:(setq theDocsObj (vla-get-documents (vlax-get-acad-object))) (vla-activate (vla-open theDocsObj MyFileName :vlax-false MyPassword))
Mircea
Excellent Mircea.
Thanks a lot.
Mehrdad Ahankhah مهرداد آهن خواه
www.IranCAD.com
Just hopping in, can you give me an example how to protect and unprotect a drawing? I am curious how it works.
Thanks in advance!
Mehrdad Ahankhah مهرداد آهن خواه
www.IranCAD.com
All that really does is prevent someone from opening a drawing. It does not prevent a person from editing a drawing once it is opened. Don't forget the password either as there is no means to brute force the drawing open.
"I have only come here seeking knowledge. Things they wouldn't teach me of in college." The Police
Eat brains...gain more knowledge!
Thanks, I did not realize it was that kind of protection, like in word and excel.
I have no intentions to use this however. Thanks again for the explaining!
Assume that you have a protected dwg file containing some blocks, hatches, linetypes, etc. and you want to use them just by your program. It is a good way to do the task. So you don't need to enclose *.pat or *.lin with your program...
But one thing is remaining. How is it possible to insert a protected .DWG file into another drawing?
Mehrdad Ahankhah مهرداد آهن خواه
www.IranCAD.com
You want to password protect a drawing then insert it into another drawing? Why? Would good would that be?
"I have only come here seeking knowledge. Things they wouldn't teach me of in college." The Police
Eat brains...gain more knowledge!
Registered forum members do not see this ad.
Mehrdad Ahankhah مهرداد آهن خواه
www.IranCAD.com
Bookmarks