オフセット基線の計画線のリストを取得する

1 本の主基線に、複数のオフセット基線が存在する場合があります。このため、すべてのオフセット基線に沿って配置されるすべての計画線のリストには別のレイヤが含まれます。Baseline.OffsetBaselineFeatureLinesCol プロパティには、BaselineFeatureLines オブジェクトのコレクションが含まれます。これらの BaselineFeatureLines オブジェクトには、主基線の計画線だけではなく、各計画線グループが所属するオフセット基線を識別するプロパティも含まれています。

次の例は、前の例をオフセット基線の計画線用に変更する方法を示しています。

// Get all the offset feature lines:
foreach (BaselineFeatureLines oBaselineFeaturelines in oBaseline.OffsetBaselineFeatureLinesCol)
{                            
    foreach (FeatureLineCollection oFeatureLineCollection in oBaselineFeaturelines.FeatureLineCollectionMap)
    {
        ed.WriteMessage("Feature Line Collection\n# Lines in collection: {0}\n",
        oFeatureLineCollection.Count);
        foreach (FeatureLine oFeatureLine in oFeatureLineCollection)
        {
            ed.WriteMessage("Feature line code: {0}\n", oFeatureLine.CodeName);
            // print out all point locations on the feature line
            foreach (FeatureLinePoint oFeatureLinePoint in oFeatureLine.FeatureLinePoints)
            {
                ed.WriteMessage("Point: {0},{1},{2}\n",
                    oFeatureLinePoint.XYZ.X,
                    oFeatureLinePoint.XYZ.Y,
                    oFeatureLinePoint.XYZ.Z);
            }
 
        }
 
    }
}

オフセット基線とハードコードされたオフセット基線もそれぞれ、その基線に関連する計画線に直接アクセスできます。どちらのタイプのオフセット基線についても、RelatedOffsetBaselineFeatureLines プロパティを通して BaselineFeatureLines コレクションにアクセスします。