ポイント スタイルを作成する

ポイント スタイルは、ポイントの作成方法を定義する設定をまとめたものです。これらの設定には、マーカー スタイル、マーカー色と線分タイプ、ラベル色と線分タイプが含まれます。ポイント オブジェクトは、ドキュメントに格納されている任意のポイント スタイルを使用できます。ポイントにスタイルを割り当てるには、そのポイントの AeccPoint.Style プロパティを使用します。 既存のポイント スタイルは、ドキュメントの AeccDocument.PointStyles プロパティに格納されています。

また、カスタム スタイルを作成し、それらをドキュメントのポイント スタイル コレクションに追加することもできます。最初に、AeccDocument.PointStyles.Add メソッドを使用して、新しいスタイルをドキュメントのスタイル リストに追加します。 このメソッドは、既定のスタイルのすべてのプロパティが設定された新しいスタイル オブジェクトを返します。次に、必要に応じてこのスタイル オブジェクトを変更します。

次の例では、新しいポイントを作成し、スタイル設定を調整して、スタイルをポイント Point1 に割り当てます。

' Create the style objects to use.
Dim oPointStyles As AeccPointStyles
Dim oPointStyle As AeccPointStyle
 
Set oPointStyles = oDocument.PointStyles
 
' Add the style to the document's collection of point styles.
Set oPointStyle = oPointStyles.Add("Sample Point Style")
 
' This style substitutes the normal point marker
' with a dot with a circle around it.
oPointStyle.MarkerType = aeccUseCustomMarker
oPointStyle.CustomMarkerStyle = aeccCustomMarkerDot
oPointStyle.CustomMarkerSuperimposeStyle = _
  aeccCustomMarkerSuperimposeCircle
 
' Now set the point to use this style.
oPoint1.Style = oPointStyle