Provides access to members that control the attribute field.
An attribute field is a specific attribute whose values are found in a field or a set of fields returned by the query set for the object type (that is, the element type or the diagram type) it is related to.
| Description | ||
|---|---|---|
![]() |
FieldNames | List of the field names that build the attribute field. These fields must be returned by the query set for the related object type. |
![]() |
Name | Name of the attribute field. |
| CoClasses and Classes | Description |
|---|---|
| NgAttributeField | Attribute field object. |
This code sample shows how you can create a new INgAttributeField interface for a node element type. The node element type in this example calls "Stations", the "Size" field returned by the query set for the node element type is the field that will be related to the attribute field you want to create. This new attribute will call "Stations_Size":
Private WithEvents m_NgProject As esriSchematic.NgProject
Private m_INgProject As esriSchematic.INgProject
...
Dim pNodeEltType As INgElementType
Dim pObjectType As INgObjectType
Dim pAttribField As INgAttributeField
Dim pFieldName As INgName
Dim pFieldNamesList As INgNames
...
Set pFieldName = New NgName
Set pFieldNamesList = New NgNames
Set pNodeEltType = m_INgProject.GetElementType("Stations")
Set pObjectType = pNodeEltType
pObjectType.CreateAttribute "Stations_Size", esriNgFieldAttribute
Set pAttribField = pObjectType.GetAttribute("Stations_Size ")
pFieldName.Name = "Size"
pFieldNamesList.Add pFieldName
pAttribField.FieldNames = pFieldNamesList