横断ビューは、1 つの横断抽出ラインの横断のグラフです。各横断抽出ラインには、その AeccSampleLine.SectionViews プロパティに横断ビューのコレクションが含まれています。 新しい横断ビューを作成するには、AeccSectionViews.Add メソッドを使用します。このメソッドは、パラメータとして新しい横断ビューの名前、作成先のレイヤ、位置、ビューのスタイル、およびオプションのデータ帯セットを取ります。 各横断ビューは自動的に作成され、適切なサイズのグラフの中央に横断抽出ラインの横断が表示されます。個々の横断抽出ラインの長さとサーフェス高度は異なる場合があるため、各横断ビューのサイズやグラフ軸に沿って表示される単位も異なる場合があります。
次の例では、指定された線形上のすべての横断抽出ラインから横断ビューの列を作成します。
Dim i As Integer Dim j As Integer ' Use the first section view style in the document. Dim oSectionViewStyle As AeccSectionViewStyle Set oSectionViewStyle = oDocument.SectionViewStyles.Item(0) ' Specify the starting location of the row of section ' views. Dim dX As Double Dim dY As Double dX = 6000 dy = 3500 ' We have an alignment with sample lines. Loop through ' all the sample line groups in the alignment. For i = 0 To oAlignment.SampleLineGroups.Count - 1 Dim oSampleLineGroup As AeccSampleLineGroup Set oSampleLineGroup = oAlignment.SampleLineGroups.Item(i) Dim oSampleLines As AeccSampleLines Set oSampleLines = oSampleLineGroup.SampleLines ' Now loop through all the sample lines in the current ' sample line group. For each sample line, we add a ' section view at a unique location with a style and ' a data band that we defined earlier. Dim dOffsetRight As Double dOffsetRight = 0 For j = 0 To oSampleLines.Count - 1 Dim oSectionView As AeccSectionView dOffsetRight = j * 300 Dim dOriginPt(0 To 2) As Double ' To the right of the surface and the previous ' section views. dOriginPt(0) = dX + 200 + dOffsetRight dOriginPt(1) = dY Set oSectionView=oSampleLines.Item(j).SectionViews.Add( _ "Section View" & CStr(j), _ "0", _ dOriginPt, _ oSectionViewStyle, _ Nothing) ' "Nothing" means do not display a data band Next j Next i