This document is archived and information here might be outdated.  Recommended version.


Add A Point Vertices Collection On A SchematicInMemoryFeatureLink Snippet (ArcObjects .NET 10.4 SDK)
ArcObjects Library Reference

Add A Point Vertices Collection On A SchematicInMemoryFeatureLink Snippet

Add a list of point vertices on a SchematicInMemoryFeatureLink. The vertices are added on the last link segment.

[C#]
        /// <summary>
        /// Add a list of point vertices on a SchematicInMemoryFeatureLink
        /// </summary>
        /// <param name="schemLink">The ISchematicInMemoryFeatureLink where the vertices are added</param>
        /// <param name="pPoints">The point vertices IPointCollection</param>
        public void AddVertexCollectionToLink(ESRI.ArcGIS.Schematic.ISchematicInMemoryFeatureLink schemLink, ESRI.ArcGIS.Geometry.IPointCollection pPoints)
        {
                // cast SchematicInMemoryFeatureLink into ISchematicInMemoryFeatureLinkGeometry
                ESRI.ArcGIS.Schematic.ISchematicInMemoryFeatureLinkGeometry myGeo=(ESRI.ArcGIS.Schematic.ISchematicInMemoryFeatureLinkGeometry)schemLink;
                if (myGeo != null)
                {
                        myGeo.AddVertexCollection(pPoints);
                }
        }
[Visual Basic .NET]
        ''' <summary>
        ''' Add a list of point vertices on a SchematicInMemoryFeatureLink
        ''' </summary>
        ''' <param name="schemLink">The ISchematicInMemoryFeatureLink where the vertices are added</param>
        ''' <param name="pPoints">The point vertices IPointCollection</param>
        Public Sub AddVertexCollectionToLink(ByVal schemLink As ESRI.ArcGIS.Schematic.ISchematicInMemoryFeatureLink, ByVal pPoints As ESRI.ArcGIS.Geometry.IPointCollection)

                ' cast SchematicInMemoryFeatureLink into ISchematicInMemoryFeatureLinkGeometry
                Dim myGeo As ESRI.ArcGIS.Schematic.ISchematicInMemoryFeatureLinkGeometry=TryCast(schemLink, ESRI.ArcGIS.Schematic.ISchematicInMemoryFeatureLinkGeometry)
                If myGeo IsNot Nothing Then
                        myGeo.AddVertexCollection(pPoints)
                End If
        End Sub

Additional Requirements
  • The code in this document requires the following References added to the Visual Studio project:
  • ESRI.ArcGIS.Geometry
  • ESRI.ArcGIS.Schematic