シェイプ スタイル

すべてのシェイプ スタイル オブジェクトのコレクションは、CivilDocument.ShapeStyles プロパティに存在します。このスタイル オブジェクトには、アセンブリとサブアセンブリのシェイプの外観(輪郭と内部領域を含む)を調整するためのプロパティが含まれています。

注:

シェイプ スタイル オブジェクトはシェイプ オブジェクトと一緒に使用できませんが、代わりに道路スタイル セットと一緒に使用できます。

// Create a new shape style and change it so that it has
// an orange border and a yellow hatch fill.
objId = doc.Styles.ShapeStyles.Add("Style3");
ShapeStyle oShapeStyle = ts.GetObject(objId, OpenMode.ForWrite) as ShapeStyle;
// 50 = yellow
oShapeStyle.AreaFillDisplayStylePlan.Color = Color.FromColorIndex(ColorMethod.ByAci, 50);
oShapeStyle.AreaFillDisplayStylePlan.Visible = true;
oShapeStyle.AreaFillHatchDisplayStylePlan.HatchType = HatchType.PreDefined;
oShapeStyle.AreaFillHatchDisplayStylePlan.Pattern = "LINE";
// 30 = orange
oShapeStyle.BorderDisplayStylePlan.Color = Color.FromColorIndex(ColorMethod.ByAci, 30);
oShapeStyle.BorderDisplayStylePlan.Visible = true;
 
ts.Commit();