csaveas地址怎么写( 二 )


dialog.AddExtension = true;
var path="";//这是打开的文件路径
if(File.Exists(path))
{
//此处执行对应文件的Save方法,此方法一般需要path作为参数来表示文件保存的位置
}
else
{
if (dialog.ShowDialog() == DialogResult.OK)
{
path = dialog.FileName;
}
else
return;
//此处执行对应文件的Save方法,此方法一般需要path作为参数来表示文件保存的位置
}
7.vb另存为(saveas)命令存autocad文件如何设置密码,要求写一个vb码参考方法AcadSecurityParams
Sub Example_Action()
' This example encrypts and saves a file.
Dim acad As New AcadApplication
Dim sp As New AcadSecurityParams
acad.Visible = True
sp.Action = .ACADSECURITYPARAMS_ENCRYPT_DATA
sp.Algorithm = .ACADSECURITYPARAMS_ALGID_RC4
sp.KeyLength = 40
sp.Password = UCase("mypassword") 'AutoCAD 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
End Sub
【csaveas地址怎么写】

csaveas地址怎么写

文章插图