Пример #1
0
        public static ElementId getSelectedFamily(UIDocument uidoc)
        {
            Document doc = uidoc.Document;

            //Get first ElementId of a Note Block family.
            ICollection <ElementId> noteblockFamilies = ViewSchedule.GetValidFamiliesForNoteBlock(doc);

            ElementId symbolId = noteblockFamilies.First <ElementId>();

            return(symbolId);
        }
Пример #2
0
        public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
        {
            TaskDialog.Show("Message", "This feature of O/A Tools is not complete yet.");


            UIApplication uiapp = commandData.Application;
            UIDocument    uidoc = uiapp.ActiveUIDocument;
            Application   app   = uiapp.Application;
            Document      doc   = uidoc.Document;

            //Get first ElementId of a Note Block family.
            ICollection <ElementId> noteblockFamilies = ViewSchedule.GetValidFamiliesForNoteBlock(doc);
            ElementId symbolId = noteblockFamilies.First <ElementId>();

            //CreateDNoteLegend(doc, symbolId);

            //Gets the element associated with the ID
            //Element eFromId = doc.GetElement(symbolId);

            //ParameterSet pSet = eFromId.Parameters;



            //foreach (Parameter param in pSet)
            //{
            //    TaskDialog.Show("Test", param.GUID.ToString());

            //    if (param.IsShared)
            //    {
            //        TaskDialog.Show("Test", param.GUID.ToString());
            //    }
            //}


            return(Result.Succeeded);
        }