ポイント オブジェクトにはユーザ定義プロパティを関連付けることができ、ユーザ定義の分類にまとめたり、「未分類」という分類に配置することができます。新しい分類とユーザ定義プロパティは API を介して作成できます。ただし、ポイントにアタッチされている既存のユーザ定義プロパティの値にはアクセスできません。ユーザ定義プロパティおよび分類の詳細は、「ユーザ定義プロパティの分類」( 『AutoCAD Civil 3D ユーザ ガイド』)を参照してください。
次の例では、Example というポイントの新しいユーザ定義のプロパティ分類を作成し、上限と下限および既定値で新しいユーザ定義プロパティを追加します。
Dim oApp As AcadApplication Set oApp = ThisDrawing.Application ' NOTE - Always specify the version number. Const sAppName = "AeccXUiLand.AeccApplication.6.0" Set g_vCivilApp = oApp.GetInterfaceObject(sAppName) Set g_oDocument = g_vCivilApp.ActiveDocument Set g_oAeccDb = g_oDocument.Database Dim oUDPClass As AeccUserDefinedPropertyClassification Dim oUDPProp As AeccUserDefinedProperty 'Create a user-defined parcel property classification Set oUDPClass = g_oAeccDb.PointUserDefinedPropertyClassifications.Add("Example") ' Add a Property to our new classification An integer using upper ' and lower bound limits of 10 and 20 with a default value of 15 Set oUDPProp = oUDPClass.UserDefinedProperties.Add("Extra Data", _ "Some Extra Data", aeccUDPPropertyFieldTypeInteger, True, False, 10, True, _ False, 20, True, 15, Null)