torch 发表于 2005-10-4 16:11:00

怎样将以下代码转入VB中要做怎样修改

Dim acad As New AcadApplication
    Dim sp As New AcadSecurityParams
   
    acad.Visible = True
    sp.Action = AcadSecurityParamsType.ACADSECURITYPARAMS_ENCRYPT_DATA
    sp.Algorithm = AcadSecurityParamsConstants.ACADSECURITYPARAMS_ALGID_RC4
    sp.KeyLength = 40
    sp.Password = UCase("mypassword") ' converts all passwords to uppercase before applying them
    sp.ProviderName = "Microsoft Base Cryptographic Provider v1.0"
    sp.ProviderType = 1
   
    acad.ActiveDocument.SaveAs "C:\MyDrawing.dwg", , sp
请大侠指点迷津

wmz 发表于 2005-10-4 20:50:00

把第二句改成这样:
    Dim sp As AcadSecurityParams
    Set sp = GetInterfaceObject("AutoCAD.SecurityParams.16")
页: [1]
查看完整版本: 怎样将以下代码转入VB中要做怎样修改