GenericZone.CreateSketchBased
Description:
Creates a new instance of a sketch-based generic zone and adds it to the document.
Creates a new instance of a sketch-based generic zone and adds it to the document.
public static GenericZone CreateSketchBased(
Document doc,
ElementId typeId,
string name,
GenericZoneDomainData domainData,
ElementId levelId,
IList<CurveLoop> curveLoops
)
-
docThe document where the element will be created and added.
-
typeIdThe sketch-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.
-
IList<CurveLoop>curveLoopsThe loops that define the lines, curves and areas that overlap or crosses the elements you want to belong to the zone. Multiple loops are allowed, they can be open or closed, but they should be on the same horizontal plane.
-
The element type is not a valid sketch-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 curve loops in the input array are empty. -or- The input curve loops do not all lie in the same horizontal plane.
-
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.