-
Notifications
You must be signed in to change notification settings - Fork 0
/
CommandSettings.cs
47 lines (33 loc) · 1003 Bytes
/
CommandSettings.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
42
43
44
45
46
47
using Autodesk.Revit.Attributes;
using Autodesk.Revit.DB;
using Autodesk.Revit.UI;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SnapMe
{
// Attributes
[Transaction(TransactionMode.Manual)]
[Regeneration(RegenerationOption.Manual)]
public class CommandSettings : IExternalCommand
{
public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
{
try
{
// the user can select the directory on his/her own from the inteface
//instantiate the directory selection window
RevitImageSaver window = new RevitImageSaver();
window.ShowDialog();
}
catch(Exception ex)
{
message = ex.Message;
return Result.Failed;
}
return Result.Succeeded;
}
}
}