ArcObjects Library Reference  (Schematic)    

INgAttributeField Interface

Provides access to members that control the attribute field.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server. Requires Schematics Extension.

Description

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.

Members

Description
Read/write property 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.
Read/write property Name Name of the attribute field.

CoClasses that implement INgAttributeField

CoClasses and Classes Description
NgAttributeField Attribute field object.
[Visual Basic 6.0]

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

See Also

INgAttribute Interface

 


Feedback Send feedback on this page