For “info347074” who asked at AUGI about getting the values of shared parameters that are shown in labels on a sheet, here is a little macro showing how it can be done. Getting the parameter values from the sheets is no different than getting the values from any other Revit element.
public void GetSheetParams()
{
Document doc = this.ActiveUIDocument.Document;
string sheetInfo = "";
foreach (Element e in new FilteredElementCollector(doc).OfClass(typeof(ViewSheet)))
{
// get the parameter
Parameter parameter = e.get_Parameter("CADFile");
// get the string value of the parameter
string cadFileData = parameter.AsString();
sheetInfo += cadFileData + "\n";
}
TaskDialog.Show("CADFile", sheetInfo);
}