BuildingCoder.CmdNewSweptBlend.Execute C# (CSharp) Метод

Execute() публичный Метод

public Execute ( ExternalCommandData commandData, string &message, ElementSet elements ) : System.Result
commandData ExternalCommandData
message string
elements ElementSet
Результат System.Result
        public Result Execute(
            ExternalCommandData commandData,
            ref string message,
            ElementSet elements)
        {
            UIApplication app = commandData.Application;
              Document doc = app.ActiveUIDocument.Document;

              if( doc.IsFamilyDocument )
              {
            using( Transaction tx = new Transaction( doc ) )
            {
              tx.Start( "Create New Swept Blend" );

              CreateNewSweptBlend( doc );
              CreateNewSweptBlendArc( doc );

              tx.Commit();

              return Result.Succeeded;
            }
              }
              else
              {
            message
              = "Please run this command in a family document.";

            return Result.Failed;
              }
        }