+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 20
  1. #1
    Senior Member Ahankhah's Avatar
    Computer Details
    Ahankhah's Computer Details
    Operating System:
    Windows XP
    Using
    AutoCAD 2012
    Join Date
    Jun 2010
    Location
    Tehran, Iran
    Posts
    430

    Question How to open a password protected drawing via Visual LISP?

    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

  2. #2
    Forum Deity MSasu's Avatar
    Discipline
    Construction
    MSasu's Discipline Details
    Occupation
    engineer
    Discipline
    Construction
    Details
    AutoLISP programmer
    Using
    AutoCAD 2013
    Join Date
    Mar 2009
    Location
    Brasov, Romania
    Posts
    2,999

    Default

    This may do the trick:

    Code:
    (setq theDocsObj (vla-get-documents (vlax-get-acad-object)))
    (vla-activate (vla-open theDocsObj MyFileName :vlax-false MyPassword))
    Regards,
    Mircea

  3. #3
    Senior Member Ahankhah's Avatar
    Computer Details
    Ahankhah's Computer Details
    Operating System:
    Windows XP
    Using
    AutoCAD 2012
    Join Date
    Jun 2010
    Location
    Tehran, Iran
    Posts
    430

    Default

    Excellent Mircea.
    Thanks a lot.
    Mehrdad Ahankhah مهرداد آهن خواه
    www.IranCAD.com

  4. #4
    Super Member MarcoW's Avatar
    Computer Details
    MarcoW's Computer Details
    Operating System:
    Microsoft Windows 7 Pro 64-bit
    Computer:
    A black one
    CPU:
    Intel Xeon E5520 Quad Core
    RAM:
    8 GB
    Graphics:
    NVIDIA Quadro FX 580 - 512MB
    Primary Storage:
    300 GB 10000 RPM
    Using
    AutoCAD 2011
    Join Date
    Apr 2009
    Location
    The Netherlands
    Posts
    599

    Default

    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!

  5. #5
    Senior Member Ahankhah's Avatar
    Computer Details
    Ahankhah's Computer Details
    Operating System:
    Windows XP
    Using
    AutoCAD 2012
    Join Date
    Jun 2010
    Location
    Tehran, Iran
    Posts
    430

    Default

    Quote Originally Posted by MarcoW View Post
    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!
    1- Issue SAVEAS command
    2- In the Save Drawing As dialog, open Tools menu in the upper right of the window.
    3- Select Security Options... item.
    4- In the new dialog, under the Password tab, you can set, change, or remove password for the current drawing.
    Mehrdad Ahankhah مهرداد آهن خواه
    www.IranCAD.com

  6. #6
    Quantum Mechanic ReMark's Avatar
    Computer Details
    ReMark's Computer Details
    Operating System:
    Windows 7 Pro 64-bit
    Computer:
    Thinkmate
    Motherboard:
    Intel DX58SO2 LGA1366 X58
    CPU:
    Intel i7-960 Quad-core 3.20GHz 8MB cache
    RAM:
    12GB (3x4GB) PC3-106000 DDR3
    Graphics:
    nVidia Quadro 4000, 2GB GDDR5
    Primary Storage:
    150GB Velocipraptor 10,000 rpm
    Secondary Storage:
    none
    Monitor:
    Dell P24LLH - 24" wide screen LCD
    Discipline
    See details...
    ReMark's Discipline Details
    Occupation
    CAD Draftsman/Designer...chemical manufacturing.
    Discipline
    See details below.
    Details
    I work for a specialty chemical manufacturer. I do a little bit of everything from P&IDs to civil to architectural and structural.
    Using
    AutoCAD 2013
    Join Date
    Nov 2005
    Location
    Norwalk, CT USofA
    Posts
    33,058

    Default

    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!

  7. #7
    Super Member MarcoW's Avatar
    Computer Details
    MarcoW's Computer Details
    Operating System:
    Microsoft Windows 7 Pro 64-bit
    Computer:
    A black one
    CPU:
    Intel Xeon E5520 Quad Core
    RAM:
    8 GB
    Graphics:
    NVIDIA Quadro FX 580 - 512MB
    Primary Storage:
    300 GB 10000 RPM
    Using
    AutoCAD 2011
    Join Date
    Apr 2009
    Location
    The Netherlands
    Posts
    599

    Default

    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!

  8. #8
    Senior Member Ahankhah's Avatar
    Computer Details
    Ahankhah's Computer Details
    Operating System:
    Windows XP
    Using
    AutoCAD 2012
    Join Date
    Jun 2010
    Location
    Tehran, Iran
    Posts
    430

    Default

    Quote Originally Posted by ReMark View Post
    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.
    Quote Originally Posted by MarcoW View Post
    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

  9. #9
    Quantum Mechanic ReMark's Avatar
    Computer Details
    ReMark's Computer Details
    Operating System:
    Windows 7 Pro 64-bit
    Computer:
    Thinkmate
    Motherboard:
    Intel DX58SO2 LGA1366 X58
    CPU:
    Intel i7-960 Quad-core 3.20GHz 8MB cache
    RAM:
    12GB (3x4GB) PC3-106000 DDR3
    Graphics:
    nVidia Quadro 4000, 2GB GDDR5
    Primary Storage:
    150GB Velocipraptor 10,000 rpm
    Secondary Storage:
    none
    Monitor:
    Dell P24LLH - 24" wide screen LCD
    Discipline
    See details...
    ReMark's Discipline Details
    Occupation
    CAD Draftsman/Designer...chemical manufacturing.
    Discipline
    See details below.
    Details
    I work for a specialty chemical manufacturer. I do a little bit of everything from P&IDs to civil to architectural and structural.
    Using
    AutoCAD 2013
    Join Date
    Nov 2005
    Location
    Norwalk, CT USofA
    Posts
    33,058

    Default

    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!

  10. #10
    Senior Member Ahankhah's Avatar
    Computer Details
    Ahankhah's Computer Details
    Operating System:
    Windows XP
    Using
    AutoCAD 2012
    Join Date
    Jun 2010
    Location
    Tehran, Iran
    Posts
    430

    Default

    Registered forum members do not see this ad.

    Quote Originally Posted by ReMark View Post
    You want to password protect a drawing then insert it into another drawing? Why? Would good would that be?
    I want to use some encrypted info in it.
    Mehrdad Ahankhah مهرداد آهن خواه
    www.IranCAD.com

Similar Threads

  1. How to open and close a Folder by visual lisp?
    By nataca in forum AutoLISP, Visual LISP & DCL
    Replies: 9
    Last Post: 31st Jul 2012, 10:01 pm
  2. Open and send email using visual lisp
    By Small Fish in forum AutoLISP, Visual LISP & DCL
    Replies: 3
    Last Post: 15th Jul 2011, 03:28 pm
  3. Creating .fas files and password protected dwg
    By blackeagle1245 in forum AutoLISP, Visual LISP & DCL
    Replies: 19
    Last Post: 6th May 2011, 07:52 pm
  4. Password Protected Drawings???
    By Woutie in forum AutoCAD General
    Replies: 6
    Last Post: 26th Mar 2010, 07:21 am
  5. Error when opening a password-protected drawing file
    By Autodesk in forum AutoCAD RSS Feeds
    Replies: 0
    Last Post: 29th Sep 2006, 04:30 pm

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts