-
Notifications
You must be signed in to change notification settings - Fork 1
/
ServiceModify.cs
41 lines (37 loc) · 1.27 KB
/
ServiceModify.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
using System;
using System.Windows.Forms;
using Autodesk.Revit.Attributes;
using Autodesk.Revit.DB;
using Autodesk.Revit.UI;
using Bimbot.BimbotUI;
// ReSharper disable UnusedMember.Global
namespace Bimbot
{
[Transaction(TransactionMode.Manual)]
[Regeneration(RegenerationOption.Manual)]
[Journaling(JournalingMode.NoCommandData)]
public class ServiceModify : IExternalCommand
{
public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
{
UIDocument uidoc = commandData.Application.ActiveUIDocument;
if (uidoc.Document.PathName.EndsWith(".rfa", StringComparison.InvariantCultureIgnoreCase))
{
throw new Exception("Revit Families are not supported for Bimbot services");
}
try
{
ServiceModifyForm form = new ServiceModifyForm(commandData.Application.ActiveUIDocument.Document);
form.ShowDialog();
// RevitBimbot.ActivateButtons(commandData.Application.ActiveUIDocument.Document);
}
catch (Exception ex)
{
string mssg = ex.Message;
MessageBox.Show(mssg, @"Exception in BIMserver Export");
}
// autosucceed for now
return Result.Succeeded;
}
}
}