GenericZone.CreateSpaceBased
Description:
Creates a new instance of a generic zone using a set of spaces and adds it to the document.
Creates a new instance of a generic zone using a set of spaces and adds it to the document.
public static GenericZone CreateSpaceBased(
Document doc,
ElementId typeId,
string name,
GenericZoneDomainData domainData,
ElementId levelId,
ISet<ElementId> spaceIds
)
-
docThe document where the element will be created and added.
-
typeIdThe space-based element type for the new generic zone.
-
StringnameThe name of the generic zone to be created.
-
domainDataThe specific domain requirements for the generic zone.
-
levelIdThe base level on which the generic zone will be created.
-
ISet<ElementId>spaceIdsThe associated spaces for the zone.
-
The element type is not a valid space-based type for this generic zone. -or- name is an empty string. -or- name cannot include prohibited characters, such as "{, }, [, ], |, ;, less-than sign, greater-than sign, ?, `, ~". -or- The ElementId levelId is not a Level. -or- The ElementIdSet spaceIds must be all MEP Spaces, and associated with the same level as levelId.
-
A non-optional argument was null
-
The document is in failure mode: an operation has failed, and Revit requires the user to either cancel the operation or fix the problem (usually by deleting certain elements).
-
The document is in failure mode: an operation has failed, and Revit requires the user to either cancel the operation or fix the problem (usually by deleting certain elements). -or- The document is being loaded, or is in the midst of another sensitive process.
-
The document has no open transaction.