GlobalParametersManagerGetAllGlobalParameters Method |
Returns all global parameters available in the given document.
Namespace: Autodesk.Revit.DBAssembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntaxpublic static ISet<ElementId> GetAllGlobalParameters(
Document document
)
Public Shared Function GetAllGlobalParameters (
document As Document
) As ISet(Of ElementId)
public:
static ISet<ElementId^>^ GetAllGlobalParameters(
Document^ document
)
static member GetAllGlobalParameters :
document : Document -> ISet<ElementId>
Parameters
- document Document
-
The document containing the global parameters
Return Value
ISetElementId
A collection of Element Ids of global parameter elements.
ExceptionsException | 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
public ISet<ElementId> GetAllGlobalParameters(Document document)
{
if (GlobalParametersManager.AreGlobalParametersAllowed(document))
{
return GlobalParametersManager.GetAllGlobalParameters(document);
}
return new HashSet<ElementId>();
}
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
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
See Also