干渉チェックは、2 つの異なるパイプ ネットワークのパイプ パーツの交差、または同じネットワークのパイプどうしの交差を検出します。すべての干渉チェックのコレクション(AeccInterferenceChecks 型のオブジェクト)は、ドキュメントの AeccPipeDocument.InterferenceChecks プロパティに格納されます。 新しい干渉チェックは、AeccInterferenceChecks.Create メソッドを使用して作成します。このメソッドでは、AeccInterferenceCheckCreationData パラメータが必要です。作成データ オブジェクトは、干渉チェックの実行に必要なすべての情報を保持します。これには、実行するチェックのタイプ、干渉に必要なパーツ間の距離、チェック対象のパイプ ネットワークが含まれます。新しい作成データ オブジェクトは、AeccInterferenceChecks.GetDefaultCreationData メソッドを使用することによってのみ作成できます。 有効なチェックのためには、少なくとも作成データ オブジェクトの Name、LayerName、SourceNetwork、および TargetNetwork プロパティを設定する必要があります。
次の例では、2 つのネットワークの間で干渉チェックを実行します。
' Get the collection of all interference checks. Dim oInterferenceChecks As AeccInterferenceChecks Set oInterferenceChecks = oPipeDocument.InterferenceChecks ' Set up the creation data structure for making an ' interference check. Dim oCreationData As AeccInterferenceCheckCreationData Set oCreationData = oInterferenceChecks.GetDefaultCreationData ' If pipes are closer than 3.5 units apart, count it as an ' intersection. oCreationData.Criteria.ApplyProximity = True oCreationData.Criteria.CriteriaDistance = 3.5 oCreationData.Criteria.UseDistanceOrScaleFactor = aeccDistance ' List the networks being tested. We will compare a network ' with itself, so we list it twice. Set oCreationData.SourceNetwork = oPipeNetwork1 Set oCreationData.TargetNetwork = oPipeNetwork2 ' Assign the check a unique name and a layer to use. oCreationData.Name = "Test 01" oCreationData.LayerName = oPipeDocument.Layers.Item(0).Name ' Create a new check of the pipe network. Dim oInterferenceCheck As AeccInterferenceCheck Set oInterferenceCheck = _ oInterferenceChecks.Create(oCreationData)