Author Topic: [Help] Can we auto-set drawings password ?  (Read 1636 times)

0 Members and 1 Guest are viewing this topic.

Ketxu

  • Newt
  • Posts: 105
[Help] Can we auto-set drawings password ?
« on: November 02, 2011, 12:11:30 AM »
I've tried to find in GG many times, but i can't find any document  about set a drawing password
(which manual is go to Option -> Open and Save -> Sercurity...)
So i wonder can we do it automatically ? (With Lisp and all other langguage )

P/S : A friend has just given me a VBA code :
Code: [Select]
Public Sub SaveWithEncryption()
Dim oSecurity As New AcadSecurityParams
With oSecurity
.Action = AcadSecurityParamsType.ACADSECURITYPARAMS_ENCRYPT_DATA
.Algorithm = AcadSecurityParamsConstants.ACADSECURITYPARAMS_ALGID_RC4
.Comment = "Add comment to drawing"
.Issuer = "Your Company Name"
.KeyLength = 40
'AutoCAD converts all passwords to uppercase before applying them
.Password = UCase("br549")
.ProviderName = "Microsoft Base Cryptographic Provider v1.0"
.ProviderType = 1
.SerialNumber = "BR549"
.Subject = "The Flying DeLorean"
.TimeServer = "NIST(time.nist.gov)"
End With
ThisDrawing.SaveAs "C:\MyDrawing.dwg", , oSecurity
End Sub
I haven't test (now is time to work with boss ^^)
I will try to convert it to Lisp and Net in free time
and..
Please test and try with me (if you interested ^^)
Thank all very much!

P/S 2 : srr all, i found some suggestions (not nothing that i've written before)..
Sorry ...
« Last Edit: November 02, 2011, 12:56:47 AM by Ketxu »

Lee Mac

  • Seagull
  • Posts: 12502
  • London, England
Re: [Help] Can we auto-set drawings password ?
« Reply #1 on: November 02, 2011, 09:17:32 AM »
A related thread, but no success there either.

GDF

  • Water Moccasin
  • Posts: 2059
Re: [Help] Can we auto-set drawings password ?
« Reply #2 on: October 14, 2014, 05:03:13 PM »
Has anyone found a lisp routine to set the security password?
Why is there never enough time to do it right, but always enough time to do it over?
BricsCAD 2020x64 Windows 10x64

RC

  • Guest
Re: [Help] Can we auto-set drawings password ?
« Reply #3 on: October 14, 2014, 05:30:16 PM »
I have no help, but the command is SECURITYOPTIONS