ArcGIS Pro 2.8 API Reference Guide
Scale(Geometry,MapPoint,Double,Double,Double) Method
Example 

ArcGIS.Core.Geometry Namespace > GeometryEngine Class > Scale Method : Scale(Geometry,MapPoint,Double,Double,Double) Method
The geometry to scale.
The origin around which the geometry will be scaled.
The scale factor along the x-axis.
The scale factor along the y-axis.
The scale factor along the z-axis.
Scales the geometry about the specified origin in a 3-dimensional manner.
Syntax
Public Overloads Function Scale( _
   ByVal geometry As Geometry, _
   ByVal origin As MapPoint, _
   ByVal sx As Double, _
   ByVal sy As Double, _
   ByVal sz As Double _
) As Geometry

Parameters

geometry
The geometry to scale.
origin
The origin around which the geometry will be scaled.
sx
The scale factor along the x-axis.
sy
The scale factor along the y-axis.
sz
The scale factor along the z-axis.

Return Value

The scaled geometry.
Exceptions
ExceptionDescription
Either geometry or origin or both are null or empty.
The method is not implemented for GeometryBag.
Incompatible spatial references between the input geometries.
The geometry or origin is not Z-Aware.
The geometry has undefined Z values for some of its vertices.
Spatial reference of geometryis an image coordinate system.
Remarks
The geometry must be z-aware or else an exception will be thrown.

GeometryEngine Scale

Example
List<MapPoint> pts = new List<MapPoint>();
pts.Add(MapPointBuilder.CreateMapPoint(1.0, 1.0, 3.0));
pts.Add(MapPointBuilder.CreateMapPoint(1.0, 3.0, 3.0));
pts.Add(MapPointBuilder.CreateMapPoint(3, 3, 3.0));
pts.Add(MapPointBuilder.CreateMapPoint(3.0, 1.0, 3.0));

MapPoint midPt = MapPointBuilder.CreateMapPoint(1.5, 1.5);

// polyline
Polyline polyline = PolylineBuilder.CreatePolyline(pts);
// polyline.Length = 6
// polyline.Length3D = 0
Geometry g = GeometryEngine.Instance.Scale(polyline, midPt, 0.5, 0.5);
Polyline resultPolyline = g as Polyline;
// resultPolyline.length  = 3
// resultPolyline.Points[0] = 1.25, 1.25, 3
// resultPolyline.Points[1] = 1.25, 2.25, 3
// resultPolyline.Points[2] = 2.25, 2.25, 3
// resultPolyline.Points[3] = 2.25, 1.25, 3

// 3D point - scale in 3d
MapPoint midPtZ = MapPointBuilder.CreateMapPoint(1.5, 1.5, 1);
g = GeometryEngine.Instance.Scale(polyline, midPtZ, 0.5, 0.5, 0.25);
resultPolyline = g as Polyline;
// resultPolyline.Points[0] = 1.25, 1.25, 1.5
// resultPolyline.Points[1] = 1.25, 2.25, 1.5
// resultPolyline.Points[2] = 2.25, 2.25, 1.5
// resultPolyline.Points[3] = 2.25, 1.25, 1.5
Requirements

Target Platforms: Windows 10, Windows 8.1

See Also

Reference

GeometryEngine Class
GeometryEngine Members
Overload List