Vla-put-providertype
- 構文
- (vla-put-providertype vla-object providertype)
- 機能
- 図面で実行するセキュリティオプションの暗号化プロバイダのタイプを設定する。
- 引数
-
- vla-object … SecurityParams の VLA オブジェクト
- providertype … 暗号化プロバイダタイプの調整数。
- 暗号プロバイダタイプに関する詳細は、MSDN を参照。
- 戻り値
- nil
- サンプル
(setq secparam
(vla-getinterfaceobject
(vlax-get-acad-object)
(strcat "autocad.securityparams.18"))) ;ACAD 2012の
; 取得
(setq sec-act (vla-get-Action secparam))
(setq sec-alg (vla-get-Algorithm secparam))
(setq sec-klen (vla-get-KeyLength secparam))
(setq sec-pwd (vla-get-password secparam))
(setq sec-pname (vla-get-ProviderName secparam))
(setq sec-ptype (vla-get-ProviderType secparam))
; 設定
(vla-put-Action secparam 1) ;; ACADSECURITYPARAMS_ENCRYPT_DATA
(vla-put-Algorithm secparam 26625) ;; ACADSECURITYPARAMS_ALGID_RC4
(vla-put-KeyLength secparam 40) ;; デフォルト
(vla-put-password secparam "MyPass") ;; パスワード
(vla-put-ProviderName secparam
"Microsoft Base Cryptographic Provider v1.0") ;; デフォルト
(vla-put-ProviderType secparam 1) ;; デフォルト
(setq *ActDoc* (vla-get-ActiveDocument (vlax-get-Acad-Object)))
(setq fileName "c:\\temp\\passwordFile.dwg")
(setq version 48) ;; 2010 DWG
(vlax-invoke-method *actdoc* 'SaveAs fileName version secparam)
関連事項