Sub test() Dim sp As New AcadSecurityParams sp.Action = AcadSecurityParamsType.ACADSECURITYPARAMS_ENCRYPT_DATA sp.Algorithm = AcadSecurityParamsConstants.ACADSECURITYPARAMS_ALGID_RC4 sp.KeyLength = 40 sp.Password = "123" sp.ProviderName = "Microsoft Base Cryptographic Provider v1.0" sp.ProviderType = 1 ThisDrawing.SaveAs "c:\a.dwg", , sp End Sub