Table of Contents

Method Of

Namespace
OpenCAD2D
Assembly
OpenCAD2D.Core.dll

Of(CadDocument, DxfEntity)

Measures an entity as it would be once added to a space of the document: a copy of it is drawn and the box and the frames of the words found; the entity itself is not changed and the document is not. A TEXT 5 high reading "Plate" has the box its letters take; an MTEXT 40 wide wrapping at 20 has the box of its lines; a dimension has the box of its lines, arrows and words. The text style and the dimension style the entity names are the document's: an entity that names one the document has not is refused, as a commit refuses it.

public static CadMeasurement Of(CadDocument document, DxfEntity entity)

Parameters

document CadDocument

The drawing the entity is to be added to, whose styles and fonts it is drawn in.

entity DxfEntity

The entity, in no space or in one.

Returns

CadMeasurement

The box and the frames.

Exceptions

ArgumentNullException

Thrown when the document or the entity is null.

ArgumentException

Thrown when a text or a dimension names a text style or a dimension style the document has not.