39 lines
1.1 KiB
C#
39 lines
1.1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using Autodesk.Revit.UI;
|
|
using Autodesk.Revit.DB;
|
|
using System.Windows.Forms;
|
|
using KMBIM.Revit.Tools.Cmd.Calculation_pad;
|
|
using KMBIM.Revit.Tools;
|
|
|
|
namespace KMBIM
|
|
{
|
|
[Autodesk.Revit.Attributes.Transaction(Autodesk.Revit.Attributes.TransactionMode.Manual)]
|
|
[Autodesk.Revit.Attributes.Regeneration(Autodesk.Revit.Attributes.RegenerationOption.Manual)]
|
|
public class CalpadLoad :IExternalCommand
|
|
{
|
|
public Result Execute(ExternalCommandData revit, ref string message, ElementSet elements)
|
|
{
|
|
try
|
|
{
|
|
//if (!WorkMain.GetInstance().IsValid) return Autodesk.Revit.UI.Result.Succeeded;
|
|
Form_Calpad dlg = new Form_Calpad();
|
|
if (dlg.ShowDialog() != DialogResult.OK) return Result.Succeeded;
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
message = e.Message;
|
|
return Result.Failed;
|
|
}
|
|
|
|
|
|
|
|
|
|
return Result.Succeeded;
|
|
}
|
|
}
|
|
}
|