批量模型创建

This commit is contained in:
GG Z
2021-12-03 18:21:26 +08:00
parent c08ea509f8
commit c6ab6a853d
21 changed files with 953 additions and 153 deletions

View File

@@ -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);