Table of Contents

Method SetHatchOrigin

Namespace
OpenCAD2D
Assembly
OpenCAD2D.Core.dll

SetHatchOrigin(CadDocument, string, GeoPoint2)

Lays a hatch's pattern from a point, as the Origin Point item of the menu of its grip does, one undo step: each line of the pattern moves by what the origin moves, as HATCHSETORIGIN moves them.

public static CadEditResult SetHatchOrigin(CadDocument document, string handle, GeoPoint2 origin)

Parameters

document CadDocument

The document.

handle string

The handle of the hatch.

origin GeoPoint2

The new origin, in drawing units.

Returns

CadEditResult

What came of it: refused for an object on a locked layer, no hatch, or a hatch with no pattern lines of its own (a solid fill, a gradient or a pattern made by the user).

Exceptions

ArgumentNullException

Thrown when the document is null.