MLightCAD
    Preparing search index...
    AcApDeleteLayerResult:
        | {
            entities: AcApLaydelEntitySnapshot[];
            layer: AcDbLayerTableRecord;
            layerName: string;
            ok: true;
        }
        | {
            layerName: string;
            ok: false;
            reason: "not_found"
            | "layer_0"
            | "current_layer";
        }

    Result of attempting to delete a layer.

    On success, includes the deleted layer record and entity snapshots for undo. On failure, includes a reason code and the requested layer name.

    Type Declaration

    • {
          entities: AcApLaydelEntitySnapshot[];
          layer: AcDbLayerTableRecord;
          layerName: string;
          ok: true;
      }
      • entities: AcApLaydelEntitySnapshot[]

        Entity snapshots removed with the layer.

      • layer: AcDbLayerTableRecord

        Cloned layer table record before removal.

      • layerName: string

        Name of the deleted layer.

      • ok: true

        Operation succeeded.

    • {
          layerName: string;
          ok: false;
          reason: "not_found" | "layer_0" | "current_layer";
      }
      • layerName: string

        Name of the layer that could not be deleted.

      • ok: false

        Operation failed.

      • reason: "not_found" | "layer_0" | "current_layer"

        Failure reason:

        • not_found — layer does not exist.
        • layer_0 — layer 0 cannot be deleted.
        • current_layer — current layer cannot be deleted.