線形は、一連の図形で構成されます。これらの図形は、線形のパスを構成する個々の線分、曲線、および放物線です。図形のコレクションは、AeccAlignment.Entities コレクションに保持されます。 このコレクションは、新しい図形を作成するためのメソッドの配列です。
次のコード サンプルは、図形作成方法をいくつか示します。
' Define the points used to create the entities. Dim point1(0 To 2) As Double Dim point2(0 To 2) As Double Dim point3(0 To 2) As Double point1(0) = 200: point1(1) = 800: point1(2) = 0 point2(0) = 600: point1(1) = 400: point1(2) = 0 point3(0) = 1000: point1(1) = 800: point1(2) = 0 ' Create a line segment entity that connects two points. Dim oAlignmentTangent As AeccAlignmentTangent Set oAlignmentTangent = oAlignment.Entities _ .AddFixedLine1(point1, point2) ' Print the length of the line segment. Debug.Print oAlignmentTangent.Length ' Create a curve entity that connects the second endpoint ' of the fixed line to another point. The radius of the ' curve depends on the direction of the fixed line and the ' location of the second endpoint. Dim oAlignmentArc As AeccAlignmentArc Set oAlignmentArc = oAlignment.Entities _ .AddFloatingCurve6(oAlignmentTangent.id, point3) ' Print the angle of direction at the second endpoint. Debug.Print oAlignmentArc.EndDirection