Global |
| Exception | Condition |
|---|---|
| ArgumentNullException | A non-optional argument was null |
/// <summary> /// Tests whether there are any global parameters present in the given document /// </summary> /// <param name="document">Revit project document.</param> /// <returns>A set of ElementIds of global parameter elements</returns> public bool ContainsGlobalParameters(Document document) { // Global parameters are not available in all documents. // They are available in projects, but not in families. if (GlobalParametersManager.AreGlobalParametersAllowed(document)) { return (GlobalParametersManager.GetAllGlobalParameters(document).Count > 0); } return false; }