干渉チェック(AeccInterferenceChecks.Create メソッドによって返された AeccInterferenceCheck オブジェクト)には、AeccInterference オブジェクトのコレクションが含まれています。各オブジェクトは、チェック中に発見された 1 つの干渉を表します。 個々の干渉は、Location プロパティに干渉の中心点の位置を保持しています。これは、X、Y、および Z 座標を表す倍精度の 3 要素配列です。 干渉領域全体の範囲は、GetExtents メソッドによって返されます。この範囲はポイントの 2 項目配列で、交差領域を含む立方体の最大および最小コーナーを表します。SourceNetworkPart および TargetNetworkPart プロパティは、交差するネットワーク パーツを保持します。
Dim oInterference As AeccInterference For Each oInterference In oInterferenceCheck ' Display the 2D x,y location of the interference. Dim vLocation As Variant Dim sLocation As String Dim vExtent As Variant vLocation = oInterference.Location sLocation = vLocation(0) & ", " & vLocation(1) MsgBox "There is an interference at:" & sLocation ' Display the greatest and least corners of the 3D ' rectangle containing the interference. vExtent = oInterference.GetExtents() Debug.Print "The interference takes place between:" sLocation = vExtent(0)(0) & ", " sLocation = sLocation & vExtent(0)(1) & ", " sLocation = sLocation & vExtent(0)(2) Debug.Print " "; sLocation; " and:" sLocation = vExtent(1)(0) & ", " sLocation = sLocation & vExtent(1)(1) & ", " sLocation = sLocation & vExtent(1)(2) Debug.Print " "; sLocation Next If (oInterferenceCheck.Count = 0) Then MsgBox "There are no interferences in the network." End If