Returns all global parameters available in the given document.
Namespace: Autodesk.Revit.DBAssembly: RevitAPI (in RevitAPI.dll) Version: 26.4.0.0 (26.4.0.0)
Syntax
C#
public static ISet<ElementId> GetAllGlobalParameters(
Document document
)
Parameters
- document Document
-
The document containing the global parameters
Return Value
ISet<ElementId>
A collection of Element Ids of global parameter elements.
Exceptions
| Exception | Condition |
|---|
| ArgumentException |
Global parameters are not supported in the given document.
A possible cause is that it is not a project document,
for global parameters are not supported in Revit families.
|
| ArgumentNullException |
A non-optional argument was null
|
Example
C#
public ISet<ElementId> GetAllGlobalParameters(Document document)
{
if (GlobalParametersManager.AreGlobalParametersAllowed(document))
{
return GlobalParametersManager.GetAllGlobalParameters(document);
}
return new HashSet<ElementId>();
}
VB
Public Function GetAllGlobalParameters(document As Document) As ISet(Of ElementId)
If GlobalParametersManager.AreGlobalParametersAllowed(document) Then
Return GlobalParametersManager.GetAllGlobalParameters(document)
End If
Return New HashSet(Of ElementId)()
End Function
See Also
Reference