![]() |
This document is archived and information here might be outdated. Recommended version. |
| ArcObjects Help for .NET developers > ESRI.ArcGIS.Snippets > Snippets > Change An In-Memory Schematic Feature Node Coordinates Snippet (ArcObjects .NET 10.4 SDK) |
Change the coordinates of an in-memory schematic feature node
/// <summary>
/// Change the coordinates of an in-memory schematic feature node
/// </summary>
/// <param name="schemNode">The ISchematicInMemoryFeatureNode which coordinates must be changed</param>
/// <param name="newXPos">The new X Position for the in-memory schematic feature node</param>
/// <param name="newYPos">The new Y Position for the in-memory schematic feature node</param>
public void ChangeNodePosition(ESRI.ArcGIS.Schematic.ISchematicInMemoryFeatureNode schemNode, double newXPos, double newYPos)
{
// cast SchematicInMemoryFeatureNodeOnLink into ISchematicInMemoryFeatureNodeGeometry
ESRI.ArcGIS.Schematic.ISchematicInMemoryFeatureNodeGeometry myGeo=(ESRI.ArcGIS.Schematic.ISchematicInMemoryFeatureNodeGeometry)schemNode;
if (myGeo != null)
{
myGeo.PutCoords(newXPos, newYPos);
}
}
''' <summary>
''' Change the coordinates of an in-memory schematic feature node
''' </summary>
''' <param name="schemNode">The ISchematicInMemoryFeatureNode which coordinates must be changed</param>
''' <param name="NewXPos">The new X Position for the in-memory schematic feature node</param>
''' <param name="NewYPos">The new Y Position for the in-memory schematic feature node</param>
''' <remarks></remarks>
Public Sub ChangeNodePosition(ByVal schemNode As ESRI.ArcGIS.Schematic.ISchematicInMemoryFeatureNode, ByVal NewXPos As Double, ByVal NewYPos As Double)
' cast SchematicInMemoryFeatureNodeOnLink into ISchematicInMemoryFeatureNodeGeometry
Dim myGeo As ESRI.ArcGIS.Schematic.ISchematicInMemoryFeatureNodeGeometry=TryCast(schemNode, ESRI.ArcGIS.Schematic.ISchematicInMemoryFeatureNodeGeometry)
If myGeo IsNot Nothing Then
myGeo.PutCoords(NewXPos, NewYPos)
End If
End Sub