public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
            {
                try
                {
                    UIDocument uidoc   = commandData.Application.ActiveUIDocument;
                    ElementId  foundId = null;

                    //是否存在族
                    Boolean found = FilterTools.existFamliyByName(uidoc.Document, GlobalSettings.FamilyName.沉降测点.ToString(), out foundId);

                    Family family = null;
                    if (found == true)
                    {
                        //如果存在,获得文件该族
                        family = uidoc.Document.GetElement(foundId) as Family;
                    }
                    else
                    {
                        //如果不存在,载入族
                        Transaction trans = new Transaction(uidoc.Document, "trans");
                        trans.Start();
                        uidoc.Document.LoadFamily(Path.Combine(GlobalSettings.Path_family, GlobalSettings.FamilyName.沉降测点.ToString() + ".rfa"), out family);
                        trans.Commit();
                    }

                    //获得该族的族类型,并且放置族实例
                    FamilySymbol symbol = uidoc.Document.GetElement(family.GetFamilySymbolIds().ElementAt(0)) as FamilySymbol;
                    uidoc.PostRequestForElementTypePlacement(symbol);
                }
                catch (Exception e)
                {
                    message = e.Message;
                    return(Autodesk.Revit.UI.Result.Failed);
                }
                return(Result.Succeeded);
            }