Revit共享参数
Document doc = commandData.Application.ActiveUIDocument.Document;
FilteredElementCollector collector = new FilteredElementCollector(doc);
List<ParameterElement> lstParameterElement = collector.OfClass(typeof(ParameterElement)).Cast<ParameterElement>().ToList();
string paraElems = "";
foreach (ParameterElement item in lstParameterElement)
{
paraElems += item.Name + Environment.NewLine;
}
System.IO.File.AppendAllText(Environment.CurrentDirectory + "\\" + DateTime.Today.ToString("yyyyMMdd") + "\\ParameterElement.txt", paraElems);