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


Insert A Point Vertices Collection On A SchematicInMemoryFeatureLink Snippet (ArcObjects .NET 10.5 SDK)
ArcObjects Library Reference

Insert A Point Vertices Collection On A SchematicInMemoryFeatureLink Snippet

Insert a list of point vertices on a SchematicInMemoryFeatureLink at a particular (X, Y) location. The vertices are inserted on the specified Position on the link.

[C#]
        /// <summary>
        /// Insert a list of point vertices on a SchematicInMemoryFeatureLink
        /// </summary>
        /// <param name="schemLink">The ISchematicInMemoryFeatureLink where the vertices are inserted</param>
        /// <param name="pPoints">The point vertices IPointCollection</param>
        /// <param name="Position">The position of the inserted vertices</param>
        public void InsertVertexCollectionToLink(ESRI.ArcGIS.Schematic.ISchematicInMemoryFeatureLink schemLink, ESRI.ArcGIS.Geometry.IPointCollection pPoints, int Position)
        {
                // cast SchematicInMemoryFeatureLink into ISchematicInMemoryFeatureLinkGeometry
                ESRI.ArcGIS.Schematic.ISchematicInMemoryFeatureLinkGeometry myGeo=(ESRI.ArcGIS.Schematic.ISchematicInMemoryFeatureLinkGeometry)schemLink;
                if (myGeo != null)
                {
                        myGeo.InsertVertexCollection(Position, pPoints);
                }
        }
[Visual Basic .NET]
        ''' <summary>
        ''' Insert a list of point vertices on a SchematicInMemoryFeatureLink
        ''' </summary>
        ''' <param name="schemLink">The ISchematicInMemoryFeatureLink where the vertices are inserted</param>
        ''' <param name="pPoints">The point vertices IPointCollection</param>
        ''' <param name="Position">The position of the inserted vertices</param>
        Public Sub InsertVertexCollectionToLink(ByVal schemLink As ESRI.ArcGIS.Schematic.ISchematicInMemoryFeatureLink, ByVal pPoints As ESRI.ArcGIS.Geometry.IPointCollection, ByVal Position 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.InsertVertexCollection(Position, 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