Generic
|
Converts a space-based generic zone to a sketch-based generic zone.
Namespace: Autodesk.Revit.DB.Analysis
Assembly: RevitAPI (in RevitAPI.dll) Version: 26.0.4.0 (26.0.4.0)

Parameters
- typeId ElementId
- The sketch-based element type for the new generic zone.

Exception | Condition |
---|---|
ArgumentException | The element typeId is not a valid sketch-based zone type. |
ArgumentNullException | A non-optional argument was null |
InvalidOperationException | The document containing this GenericZone 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 element is a member of a loaded family. -or- The element is a member of a group type that is not being edited. -or- This generic zone must be space-based. |
ModificationForbiddenException | The document containing this GenericZone 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 containing this GenericZone is being loaded, or is in the midst of another sensitive process. -or- This GenericZone is an internal element, such as a component of a loaded family or a group type. -or- The document containing this GenericZone is in Group Edit Mode, Sketch Edit Mode, or Paste Mode, and the element is not a member of the group, sketch, or clipboard. -or- This GenericZone is a member of a group or sketch, and the document is not currently editing the group or sketch. |
ModificationOutsideTransactionException | The document containing this GenericZone has no open transaction. |

This element must be the space-based before the conversion. The conversation will keep the
same element id, name, but swapped into a different type as specified.
