Method SetFrozen
- Namespace
- OpenCAD2D
- Assembly
- OpenCAD2D.Core.dll
SetFrozen(CadDocument, IEnumerable<string>, IEnumerable<string>, bool, string)
Freezes or thaws layers in viewports, as the VP Freeze column and VPLAYER Freeze and Thaw do: each viewport whose frozen layers change has one record, the layers it freezes before and after; nothing changed is no edit. A layer is frozen in a viewport even where it is the current one, as AutoCAD allows.
public static CadEditResult SetFrozen(CadDocument document, IEnumerable<string> viewports, IEnumerable<string> layers, bool frozen, string name = "LAYER")
Parameters
documentCadDocumentThe document.
viewportsIEnumerable<string>The handles of the viewports.
layersIEnumerable<string>The names of the layers.
frozenboolWhether they are to be frozen there.
namestringThe name of the undo step, as LAYER or VPLAYER.
Returns
- CadEditResult
What came of it; refused for a viewport or a layer the drawing has not.
Exceptions
- ArgumentNullException
Thrown when the document, the handles, the names or the step's name are null.