CAD Forum - tips, tricks, discussion and utilities for AutoCAD, Inventor, Revit and other Autodesk products []
CZ | EN | DE
Login or
  Visitors: 5593

CAD tip CAD tip # 13744:

Question CAD 
 %  platform  category 
Q - question

Simple password protection of Inventor documents (iLogic).

A - answer Using a simple iLogic rule, you can quite effectively (though not unsurpassably) protect the contents of an Inventor document - IPT parts, IAM assemblies, etc. - from being opened by a user without knowing the secret password.

First, create a user parameter (string) in your document, e.g. "Access_password", and assign it a value, the string with your secret password, e.g. "secret007".

Now, create an iLogic rule (e.g. "Password_check") in your document with the following program code:

Password = InputBox("Document is password protected." & vbCrLf _
		   & vbCrLf & "Enter your access password", "Access Password", "???")
If Password = Parameter.Param("Access_password").Value Then
 MessageBox.Show("Closing the secret document...", "Wrong password")
End If

The rule prompts for a password when it runs, and it closes the document immediately if the password entered does not match the value of your preset user parameter.

Now we need to set this rule to run automatically when a document (e.g. a .IPT file) is opened. You can setup this in the Management > iLogic > Event Triggers ribbon - drag your rule in the left field to the "Ater open document" event on the right.

Now save your document. Opening it again will be already protected by your secret password:

If you do not enter the password, or if you enter it incorrectly, the document will be closed immediately:

If you enter it correctly, the document is normally opened in its editable form.

You can download an example of this document (and the iLogic rule) from the Block Library - see Testpart.ipt (for Inventor 2024).

Contact Arkance Systems for information how to overcome this protection of document content... :-)

100% *  CAD 
24.5.2023    28631×  
Prices - CAD eShop:
applies to: Inventor ·

See also:
Tip 13197:How to transfer a model or sketch parameter to iProperties?
Tip 12712:How to set the option "Active Window on Save" through iLogic?
Tip 12136:Security settings for Inventor data files and add-on applications.
Tip 12046:Random shape and appearance of an Inventor part or assembly.
Tip 8468:How to display full document path in Inventor title bar?

Back   All CAD Tips

Have we helped you? If you want to support the CAD Forum web service, consider buying one of our CAD applications, or our custom software development offerings, or donating via PayPal (see above). You may also add a link to your web - like this "fan" link: CAD Forum - tips, utilities, blocks for Autodesk products
CAD:    OS:    Categ: 
Text:  FAQ glossary   

DwgTextTranslator translates a series of drawings from one language to another using MS Access.
Download a fully functional trial version.

Please use these tips at your own risk.
Arkance Systems is not responsible for possible problems that may occur as a result of using any of these tips.