ArcObjects Library Reference  (Schematic)    

INgElementType.AddPatternModel Method

Associates the specified pattern model with the element type.

[Visual Basic 6.0]
Sub AddPatternModel(
    ByVal PatternModel As INgPatternModel _
) As Empty
[Visual Basic .NET]
Public Sub AddPatternModel ( _
    ByVal PatternModel As INgPatternModel _
)
[C#]
public void AddPatternModel (
    INgPatternModel PatternModel
);
[Java]
public void addPatternModel (
    INgPatternModel PatternModel
)
throws
    IOException,
    AutomationException
[C++]
HRESULT AddPatternModel(
  INgPatternModel* PatternModel
);
[C++]

Parameters

PatternModel [in]

  PatternModel is a parameter of type INgPatternModel

Product Availability

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

Description

Associating a pattern model with an element type implies that all the elements of this element type will be displayed with a pattern based on this pattern model. If all you want to do is add a pattern for only one given link element, you can use the INgLink AddPatternModel method.

[Visual Basic 6.0]

In the following piece of code, the pattern model named PatternModel1 is associated with a given link element type. After the association, each link of this element type will be displayed with pattern(s) according to the PatternModel1 pattern model definition.

Private WithEvents m_NgProject      As esriSchematic.NgProject
Private m_INgProject      As esriSchematic.INgProject
...
Dim pLinkElementType As INgElementType
Dim pPatternModel As INgPatternModel
...
Set pPatternModel = m_INgProject.GetPatternModel("PatternModel1")
If (Not pPatternModel Is Nothing) And (pLinkElementType.Type = esriNgElementLink) Then
    pLinkElementType.AddPatternModel pPatternModel
End If

See Also

INgElementType Interface | INgLink.AddPatternModel Method | INgElementType.RemovePatternModel Method | INgElementType.GetPatternModel Method

 


Feedback Send feedback on this page