- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello All,
I am working on a Revit 2016 program in which I'd like to access the value of a Global Parameter. From working in the API I understand the following things exist:
Autodesk.Revit.DB.GlobalParametersManager
Autodesk.Revit.DB.GlobalParameter
However, I haven't quite figured out how to employ these, and I can't seem to find any information about them in the SDK.
The current way I am trying to implement them is something like this:
//**********************************************************************
//***************************Start Here*********************************
ElementId globalParam1 = GlobalParametersManager.FindByName(doc, "Global Parameter 1");
if (globalParameter1 == null)
{
TaskDialog.Show("GP Error 1", "There was a problem finding Global Parameter 1.");
break;
}
Element gp1Element = doc.GetElement(globalParam1);
double gp1 = gp1Element.LookupParameter("Value").AsDouble();
//****************************Fin***************************************
//**********************************************************************
Any help on how to access these values or locations of some documentation containing info about using/accessing Global Parameters with the Revit API would be greatly appreciated!
Thanks In Advance,
RH
Solved! Go to Solution.