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;
}
}