GlobalParametersManagerAreGlobalParametersAllowed Method |
Tests whether global parameters are allowed in the given document.
Namespace: Autodesk.Revit.DBAssembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntaxpublic static bool AreGlobalParametersAllowed(
Document document
)
Public Shared Function AreGlobalParametersAllowed (
document As Document
) As Boolean
public:
static bool AreGlobalParametersAllowed(
Document^ document
)
static member AreGlobalParametersAllowed :
document : Document -> bool
Parameters
- document Document
-
A revit document of interest.
Return Value
Boolean
Exceptions
Remarks
First of all, global parameters can be had in main project documents only;
they are not supported in family documents. However, there may also be other
circumstances due to which global parameters may be disallowed in a particular
project, either temporarily or permanently.
Example
public bool ContainsGlobalParameters(Document document)
{
if (GlobalParametersManager.AreGlobalParametersAllowed(document))
{
return (GlobalParametersManager.GetAllGlobalParameters(document).Count > 0);
}
return false;
}
Public Function ContainsGlobalParameters(document As Document) As Boolean
If GlobalParametersManager.AreGlobalParametersAllowed(document) Then
Return (GlobalParametersManager.GetAllGlobalParameters(document).Count > 0)
End If
Return False
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