public Result ses(ExternalCommandData commandData, ref string message, ElementSet elements)
{
UIApplication uiApp = commandData.Application;
Document doc = uiApp.ActiveUIDocument.Document;
View vid = doc.ActiveView;
//код изменения документа
return Result.Succeeded;
}