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


Remove Some Vertices On An In-Memory Schematic Feature Link Snippet (ArcObjects .NET 10.5 SDK)
ArcObjects Library Reference

Remove Some Vertices On An In-Memory Schematic Feature Link Snippet

Remove vertices that display along an in-memory schematic feature link starting at a specific position

[C#]
        /// <summary>
        /// Remove vertices that display along an in-memory schematic feature link starting at a specific position
        /// </summary>
        /// <param name="schemLink">The ISchematicInMemoryFeatureLink for which vertices must be removed</param>
        /// <param name="Position">The position of the first vertex to remove</param>
        /// <param name="NumberToDelete">The number of vertices starting from this first vertex which have to be removed</param>
        public void RemoveVerticesFromLink(ESRI.ArcGIS.Schematic.ISchematicInMemoryFeatureLink schemLink, int Position, int NumberToDelete)
        {
                // cast SchematicInMemoryFeatureLink into ISchematicInMemoryFeatureLinkGeometry
                ESRI.ArcGIS.Schematic.ISchematicInMemoryFeatureLinkGeometry myGeo=(ESRI.ArcGIS.Schematic.ISchematicInMemoryFeatureLinkGeometry)schemLink;
                if (myGeo != null)
                {
                        myGeo.RemoveVertices(Position, NumberToDelete);
                }
        }
[Visual Basic .NET]
        ''' <summary>
        ''' Remove vertices that display along an in-memory schematic feature link starting at a specific position
        ''' </summary>
        ''' <param name="schemLink">The ISchematicInMemoryFeatureLink for which vertices must be removed</param>
        ''' <param name="Position">The position of the first vertex to remove</param>
        ''' <param name="NumberToDelete">The number of vertices starting from this first vertex which have to be removed</param>
        Public Sub RemoveVerticesFromLink(ByVal schemLink As ESRI.ArcGIS.Schematic.ISchematicInMemoryFeatureLink, ByVal Position As Integer, ByVal NumberToDelete As Integer)
                ' cast SchematicInMemoryFeatureLink into ISchematicInMemoryFeatureLinkGeometry
                Dim myGeo As ESRI.ArcGIS.Schematic.ISchematicInMemoryFeatureLinkGeometry=TryCast(schemLink, ESRI.ArcGIS.Schematic.ISchematicInMemoryFeatureLinkGeometry)
                If myGeo IsNot Nothing Then
                        myGeo.RemoveVertices(Position, NumberToDelete)
                End If
        End Sub

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