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
InventorVb.DocumentUpdate(False)
Else
MessageBox.Show("Closing the secret document...", "Wrong password")
ThisDoc.Document.Close
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... :-)