Код: Выделить всё
public class Test : IExternalCommand
{
public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
{
try
{
var uidoc = commandData.Application.ActiveUIDocument;
var doc = uidoc.Document;
var view = doc.ActiveView;
Level levelBottom = LevelUtils.GetCurrentLevel(doc, view);
Level levelTop = LevelUtils.FindUpperLevel(doc, levelBottom);
CreateStairs(doc, levelBottom, levelTop);
return Result.Succeeded;
}
catch (Exception ex)
{
TaskDialog.Show("錯誤", $"{ex.Message}\n\n{ex.StackTrace}");
throw;
}
}
}
[img]https:/ /i.sstatic.net/82e2lQUT.png[/img]
Подробнее здесь: https://stackoverflow.com/questions/793 ... le-problem
Мобильная версия