パイプ スタイルを作成する

パイプ スタイルは、ドキュメント内のパイプの外観を制御します。ドキュメント内のすべてのパイプ スタイル オブジェクトは、AeccPipeDocument.PipeStyles コレクションに格納されます。 パイプ スタイルには、一般的な外観属性を制御するための 4 つの表示メソッドと 3 つのハッチング メソッド、およびパイプ固有の表示属性を制御するための 3 つのプロパティがあります。DisplayStylePlan|Profile|Section|Model および Ha chStylePlan|Profile|Section メソッドは変更されるフィーチャを定義するパラメータを取り、共通の表示属性(線分スタイルや色など)を制御する AeccDisplayStyle または AeccHatchDisplayStyle オブジェクトの参照を返します。PlanOption および ProfileOption プロパティは、パイプの物理プロパティ、作図単位を使用するカスタム サイズ、またはその直前の作図サイズのパーセントに基づいて内壁、外壁、および終了ラインのサイズを設定します。HatchOption プロパティは、使用されるハッチングが適用されるパイプ領域を設定します。パイプ オブジェクトには、AeccPipe.Style プロパティを AeccPipeStyle オブジェクトに割り当てることによってスタイルを設定します。

次の例では、新しいパイプ スタイル オブジェクトを作成し、そのいくつかのプロパティを設定して、パイプ オブジェクトに割り当てます。

' Create a new pipe style object.
Dim oPipeStyle As AeccPipeStyle
Set oPipeStyle = oPipeDocument.PipeStyles.Add("Pipe Style 01")
With oPipeStyle.PlanOption
    ' Set the display size of the pipes in plan view, using
    ' absolute drawing units for the inside, outside, and
    ' ends of each pipe.
    .InnerDiameter = 2.1
    .OuterDiameter = 2.4
    .EndLineSize = 2.1
 
    ' Indicate that we will use our own measurements for
    ' the inside and outside of the pipe, and not base
    ' the drawing on the actual physical measurements of
    ' the pipe.
    .WallSizeType = aeccUserDefinedWallSize
 
    ' Indicate what kind of custom sizing to use.
    .WallSizeOptions = aeccPipeUseAbsoluteUnits
End With
 
' Modify the colors of pipes using this style when shown in
' plan view.
oPipeStyle.DisplayStylePlan(aeccDispCompPipeOutsideWalls) _
  .Color = 40 ' orange
oPipeStyle.DisplayStylePlan(aeccDispCompPlanInsideWalls) _
  .Color = 255 ' white
oPipeStyle.DisplayStylePlan(aeccDispCompPipeEndLine) _
  .color = 255 ' white
 
' Set a pipe to use this style.
Set oPipe.Style = oPipeStyle