Method AddAlignmentParameter
- Namespace
- GeometryHelper.Dxf
- Assembly
- GeometryHelper.dll
AddAlignmentParameter(GeoPoint3, GeoPoint3)
Makes the block dynamic, where it is not, and gives it an alignment parameter, AutoCAD's Alignment parameter as its Block Editor makes one: a grip at the base point that turns an INSERT dragged by it in AutoCAD to lie along the entity it is dragged over, along the line from the base point to the end point. It gives no property.
public void AddAlignmentParameter(GeoPoint3 basePoint, GeoPoint3 endPoint)
Parameters
basePointGeoPoint3The point the INSERT is aligned about, where the grip stands, in the block's coordinates.
endPointGeoPoint3The point the alignment line runs to from the base point.
Remarks
A block of a pipe along x from the origin given AddAlignmentParameter(new GeoPoint3(0, 0, 0), new GeoPoint3(50,
0, 0)) has a grip at the origin that lays the pipe along a wall it is dragged over in AutoCAD. The parameter is
written as AutoCAD saved the one of ACadSharp's alignment sample: the line from the base point to the end point,
its element named Alignment, of the alignment type 1 (280) as the sample; its grip at the base point with the
direction to the end point and its two location components; four nodes of the evaluation graph and three edges. A
block has one alignment parameter, as AutoCAD's Block Editor gives it.
Exceptions
- ArgumentException
Thrown when a coordinate is not a finite number, or the two points are within the point tolerance of Default of each other seen along z. Nothing is written then.
- InvalidOperationException
Thrown when the block has an alignment parameter already, or cannot be dynamic, as AddLinearParameter(string, string, GeoPoint3, GeoPoint3, double, DxfBlockParameterValueSet) says.
- NotSupportedException
Thrown when the block has a flip parameter, as AddLinearParameter(string, string, GeoPoint3, GeoPoint3, double, DxfBlockParameterValueSet) says. Nothing is written then.