批量模型创建
This commit is contained in:
@@ -20,6 +20,7 @@ namespace AddinDeployer
|
||||
{
|
||||
//public static void Main(string[] args)
|
||||
//{
|
||||
// ProcessEvent();
|
||||
//}
|
||||
|
||||
private string path;
|
||||
@@ -32,7 +33,8 @@ namespace AddinDeployer
|
||||
{
|
||||
this.BeforeInstall += CustomActionClass_BeforeInstall;
|
||||
this.BeforeUninstall += CustomActionClass_BeforeUninstall;
|
||||
this.AfterInstall += CustomActionClass_AfterInstall;
|
||||
//this.AfterInstall += CustomActionClass_AfterInstall;
|
||||
//this.AfterUninstall += CustomActionClass_AfterUninstall;
|
||||
}
|
||||
|
||||
//private string revitvernum = "2020";
|
||||
@@ -50,17 +52,17 @@ namespace AddinDeployer
|
||||
}
|
||||
catch (Win32Exception e)
|
||||
{
|
||||
MessageBox.Show(e.Message.ToString()); // process was terminating or can't be terminated - deal with it
|
||||
MessageBox.Show(e.Message.ToString());
|
||||
}
|
||||
catch (InvalidOperationException e)
|
||||
{
|
||||
MessageBox.Show(e.Message.ToString()); // process has already exited - might be able to let this one go
|
||||
MessageBox.Show(e.Message.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void CustomActionClass_BeforeUninstall(object sender, InstallEventArgs e)
|
||||
private static void CustomActionClass_BeforeUninstall(object sender, InstallEventArgs e)
|
||||
{
|
||||
KillProcess("REVIT");
|
||||
|
||||
@@ -84,9 +86,18 @@ namespace AddinDeployer
|
||||
//}
|
||||
}
|
||||
|
||||
private void CustomActionClass_BeforeInstall(object sender, InstallEventArgs e)
|
||||
private static void CustomActionClass_BeforeInstall(object sender, InstallEventArgs e)
|
||||
{
|
||||
KillProcess("REVIT");
|
||||
try
|
||||
{
|
||||
var path = @"C:\ProgramData\Autodesk\Revit\Addins\2020";
|
||||
//DelAddinFromPath(path);
|
||||
DeleteFolder(path + "\\RsTools");
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
|
||||
//var dialogResult = System.Windows.Forms.MessageBox.Show("是否关闭Revit以安装插件", "提示", System.Windows.Forms.MessageBoxButtons.YesNo);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user