Provides access to members that control the direct property.
Along with the textual, discrete, and bounded properties, the direct property, is used for directly applying a given graphic effect, depending on the values taken up by the property itself—that is, scale factor and symbology.
| Description | ||
|---|---|---|
![]() |
ElementType | Element type the direct property applies to. |
![]() |
GraphicEffect | Returns the graphic effect applied by the direct property. |
![]() |
Name | Name of the direct property. |
| CoClasses and Classes | Description |
|---|---|
| NgDirectProperty | Graphic direct property object. |
In the following example, by creating a direct property and associating it with an attribute related to the Size field returned by the node element type’s query, the size of each node is directly reflected via a scale factor.
Note: Using such a property to directly set scale factors on nodes is interesting when the range of the variable is not very large but it is not feasible if the range of the variable is wide (between 1 and 1000, for instance).
Private WithEvents m_NgProject As esriSchematic.NgProject
Private m_INgProject As esriSchematic.INgProject
...
Dim pNodeElementType As INgElementType
Dim pObjectType As INgObjectType
Dim pAttributeField As INgAttributeField
Dim pNameField As INgName
Dim pNames As INgNames
Dim pProperty As INgProperty
...
Set pNodeElementType = m_INgProject.GetElementType("Stations")
Set pObjectType = pNodeElementType
' Attribute field creation
pObjectType.CreateAttribute "StationSize", esriNgFieldAttribute
Set pAttributeField = pObjectType.GetAttribute("Size")
Set pNameField = New NgName
pNameField.Name = "Size"
Set pNames = New NgNames
pNames.Add pNameField
pAttributeField.FieldNames = pNames
' Direct property creation and association with the desired attribute field
Set pProperty = pNodeElementType.CreateProperty("ReflectStationSize", esriNgDirectPropertyType, esriNgIntegerPropertyValue, esriNgDirectPropertyScaling)
pNodeElementType.AssociateProperty pProperty, "StationSize"
INgProperty Interface | INgBoundedProperty Interface | INgDiscreteProperty Interface | INgTextualProperty Interface | INgElementType.CreateProperty Method