Table of Contents

Class DxfOsnapPointRef

Namespace
GeometryHelper.Dxf
Assembly
GeometryHelper.dll

One point of an associative dimension tied to an object (AutoCAD's AcDbOsnapPointRef): which point of the dimension it is, the object snap it was taken by, the object, the parameter of the point on it and the point itself.

public sealed class DxfOsnapPointRef
Inheritance
DxfOsnapPointRef
Inherited Members

Remarks

Which point of the dimension (PointIndex, the bit 1 << PointIndex of the DIMASSOC's group 90) is that of AutoCAD's AcDbDimAssoc: for a linear or an aligned dimension 0 is the first extension line's origin and 1 the second's; for a radius or a diameter 1 is the center of the arc or the circle; for an angle of three points 0 and 1 are the ends of the two rays and 2 their vertex.

AutoCAD 2021 writes a DIMLINEAR snapped to both ends of a line from (0, 0) to (100, 0) as two references to the line: StartPoint of parameter 0 at point 0 and Endpoint of parameter 1 at point 1; the parameter of a line runs from 0 at its start to 1 at its end, that of an arc and a circle is the angle in radians.

Constructors

DxfOsnapPointRef(int, DxfOsnapType, string, int, double, GeoPoint3, string)

Makes a point reference to an entity.

Properties

GsMarker

Gets the marker of the part of the entity snapped to (group 91): 0 for a line, an arc or a circle; the segment of a polyline, 1 for its first, as AutoCAD 2021 writes the end of the first segment of a rectangle with marker 1 and parameter 1.

IntersectionObjectHandle

Gets the handle of the second entity of an intersection (group 332); null where there is none.

LastPointReference

Gets the reference of the point a perpendicular or a tangent was drawn from (group 75 written 1, then that reference), as AutoCAD 2021 writes a DIMALIGNED from the start of a line to the foot of its perpendicular on another: the start of the first line; its ObjectHandle null and its snap None where that point was tied to nothing. Its PointIndex is not written. Null for a point of any other snap.

NearParameter

Gets the parameter of the point on the entity (group 40).

ObjectHandle

Gets the handle of the entity snapped to (group 331); null for a LastPointReference of a point tied to nothing, which AutoCAD writes with no 331.

OsnapType

Gets the object snap the point was taken by (group 72).

Point

Gets the point snapped, in world coordinates (group 10).

PointIndex

Gets which point of the dimension the reference ties, 0 to 3.

SubentType

Gets the kind of the part of the entity snapped to (group 73): 2, an edge, for a line, an arc or a circle.

ViewportHandle

Gets the handle of the viewport the point was snapped through, for a dimension on a layout tied to objects of model space as AutoCAD's trans-spatial association ties it (DIMASSOC 70 written 1): AutoCAD writes it as a group 331 before the object's, and before the second object's 332 of an intersection. Null for a point snapped in the space the dimension is in.

Methods

ToString()
WithLastPoint(DxfOsnapPointRef)

Gives a copy of the reference that names the reference of the point its perpendicular or tangent was drawn from, as AutoCAD 2021 writes a PERpendicular or a TANgent snap: the second point of a DIMALIGNED snapped perpendicular to a line from the start of another is perpendicular.WithLastPoint(start).

WithLastPoint(GeoPoint3)

Gives a copy of the reference whose perpendicular or tangent was drawn from a point tied to nothing, as AutoCAD 2021 writes one: a last point reference of no snap and no object, at the point.

WithViewport(string)

Gives a copy of the reference snapped through a viewport, as AutoCAD 2021 ties a dimension on a layout to the model space objects a viewport shows (trans-spatial association, DIMASSOC 70 written 1): the handle of the viewport goes before the handle of the object, and of the second object of an intersection, in the DIMASSOC, and the DIMASSOC is among the reactors of the viewport. The point of the reference is kept as no point there, as AutoCAD keeps none (it writes 0, 0, 0 and, for an end, 2E50 for its Z): the object and the parameter say where the point is.