TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: Ketxu on November 02, 2011, 12:11:30 AM

Title: [Help] Can we auto-set drawings password ?
Post by: Ketxu 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 ...
Title: Re: [Help] Can we auto-set drawings password ?
Post by: Lee Mac on November 02, 2011, 09:17:32 AM
A related thread (http://www.theswamp.org/index.php?topic=33716), but no success there either.
Title: Re: [Help] Can we auto-set drawings password ?
Post by: GDF on October 14, 2014, 05:03:13 PM
Has anyone found a lisp routine to set the security password?
Title: Re: [Help] Can we auto-set drawings password ?
Post by: RC on October 14, 2014, 05:30:16 PM
I have no help, but the command is SECURITYOPTIONS