2026 Method
Changes 7
M

GenericZone.ConvertSpaceBasedToSketchBased

Description:
Converts a space-based generic zone to a sketch-based generic zone.
Remarks:
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.
public void ConvertSpaceBasedToSketchBased(
	ElementId typeId
)
  • typeId
    The sketch-based element type for the new generic zone.
  • The element typeId is not a valid sketch-based zone type.
  • A non-optional argument was null
  • 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.
  • 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.
  • The document containing this GenericZone has no open transaction.