Dim DirInfo = New DirectoryInfo(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles))
DirInfo = DirInfo.GetDirectories("Autodesk").FirstOrDefault()
Dim exefiles = DirInfo.GetFiles("accoreconsole.exe", SearchOption.AllDirectories)
Dim exepath As String Is Nothing
If exefiles.Length > 0 Then
exepath = exefiles(0).FullName
End If
Dim scriptpath = Path.Combine(Path.GetTempPath(), "Temp.scr")
Using writer = File.CreateText(scriptpath)
writer.WriteLine("ZOOM")
writer.WriteLine("EXTENTS")
writer.WriteLine("QSAVE")
End Using
Dim p = New System.Diagnostics.Process()
p.StartInfo.FileName = exepath
p.StartInfo.Arguments = String.Format("/i ""{0}"" /s ""{1}""", dwgPath, scriptpath)
p.StartInfo.UseShellExecute = False
p.StartInfo.CreateNoWindow = True
p.Start()
End Sub
|
暂时没有评论
发表评论 - 不要忘了输入验证码哦! |