Specifies the security-related operations to be performed on a drawing.
Supported platforms: AutoCAD for Windows only; not supported in AutoCAD LT for Windows
Property Value
Read-only: No
Type: Long; AcadSecurityParamsType enum
Specify one or more of the following constants for drawing encryption, drawing properties encryption, a digital signature, or a time stamp.
- ACADSECURITYPARAMS_ENCRYPT_DATA: 0x00000001
- ACADSECURITYPARAMS_ENCRYPT_PROPS: 0x00000002
- ACADSECURITYPARAMS_SIGN_DATA: 0x00000010
- ACADSECURITYPARAMS_ADD_TIMESTAMP: 0x00000020
Remarks
Each constant represents a security-related operation. When you use the Action property, at some point in the set of operations you must set the Action property to the ACADSECURITYPARAMS_SIGN_DATA constant.
To specify multiple security-related operations, add the constants representing the operations. For example, to sign a drawing and use a time stamp, specify the following:
ACADSECURITYPARAMS_SIGN_DATA + ACADSECURITYPARAMS_ADD_TIMESTAMP
Examples
VBA:
Sub Example_Action() ' This example attaches a digital signature and accompanying data to a file, ' and saves the file. Dim sp As AcadSecurityParams Set sp = GetInterfaceObject("AutoCAD.SecurityParams." & Left(AcadApplication.Version, 2)) ' Attach a digital signature and timestamp it sp.Action = AcadSecurityParamsType.ACADSECURITYPARAMS_SIGN_DATA _ + AcadSecurityParamsType.ACADSECURITYPARAMS_ADD_TIMESTAMP ' Certificate details follow sp.Subject = "Thawte Freemail Member" sp.Issuer = "Personal Freemail RSA 2000.8.30" sp.SerialNumber = "073848" sp.Comment = "This is now signed" sp.TimeServer = "NIST(time.nist.gov)" ThisDrawing.SaveAs "C:\MyDrawing.dwg", , sp End Sub
Visual LISP:
(vl-load-com) (defun c:Example_Action() ;; This example attaches a digital signature and accompanying data to a file, ;; and saves the file. (setq acadObj (vlax-get-acad-object) sp (vla-GetInterfaceObject acadObj (strcat "AutoCAD.SecurityParams." (substr (getvar "ACADVER") 1 2)))) (vla-put-Visible acadObj :vlax-true) ;; Attach a digital signature and timestamp it (vla-put-Action sp (+ ACADSECURITYPARAMS_SIGN_DATA ACADSECURITYPARAMS_ADD_TIMESTAMP)) ;; Certificate details follow (vla-put-Subject sp "Thawte Freemail Member") (vla-put-Issuer sp "Personal Freemail RSA 2000.8.30") (vla-put-SerialNumber sp "073848") (vla-put-Comment sp "This is now signed") (vla-put-TimeServer sp "NIST(time.nist.gov)") (setq doc (vla-get-ActiveDocument acadObj)) (vla-SaveAs doc "C:\\MyDrawing.dwg" acNative sp) (vlax-release-object sp) )