ArcGIS Pro 2.8 API Reference Guide
ConstructMultipatchExtrudeAlongVector3D Method (GeometryEngine)
Example 

ArcGIS.Core.Geometry Namespace > GeometryEngine Class : ConstructMultipatchExtrudeAlongVector3D Method
The base geometry.
The 3-dimensional coordinate.
Creates a multipatch from the input polygon or polyline.
Syntax
public Multipatch ConstructMultipatchExtrudeAlongVector3D( 
   Multipart multipart,
   Coordinate3D coordinate
)
Public Function ConstructMultipatchExtrudeAlongVector3D( _
   ByVal multipart As Multipart, _
   ByVal coordinate As Coordinate3D _
) As Multipatch

Parameters

multipart
The base geometry.
coordinate
The 3-dimensional coordinate.

Return Value

Returns the multipatch.
Exceptions
ExceptionDescription
Geometry is null or empty.
The geometry is not z-aware.
Remarks
Creates a multipatch from a base geometry by extruding the base geometry along an axis defined by the input 3-dimensional coordinate. The base z-values of the geometry are preserved and the top z-values are offset from the base by the z-value of the input coordinate. The top geometry is also shifted by an offset defined by the x-value and y-value of the input coordinate. The resulting extrusion is parallel to the xy-plane if and only if the base geometry is parallel to the xy-plane.
Example
// build a polygon
string json = "{\"hasZ\":true,\"rings\":[[[0,0,0],[0,1,0],[1,1,0],[1,0,0],[0,0,0]]],\"spatialReference\":{\"wkid\":4326}}";
Polygon polygon = PolygonBuilder.FromJson(json);

// extrude the polygon by an offset to create a multipatch
Multipatch multipatch = GeometryEngine.Instance.ConstructMultipatchExtrude(polygon, 2);

// a different polygon
json = "{\"hasZ\":true,\"rings\":[[[0,0,1],[0,1,2],[1,1,3],[1,0,4],[0,0,1]]],\"spatialReference\":{\"wkid\":4326}}";
polygon = PolygonBuilder.FromJson(json);

// extrude between z values to create a multipatch
multipatch = GeometryEngine.Instance.ConstructMultipatchExtrudeFromToZ(polygon, -10, 20);

// extrude along the axis defined by the coordinate to create a multipatch
Coordinate3D coord = new Coordinate3D(10, 18, -10);
multipatch = GeometryEngine.Instance.ConstructMultipatchExtrudeAlongVector3D(polygon, coord);

// build a polyline
json = "{\"hasZ\":true,\"paths\":[[[400,800,1000],[800,1400,1500],[1200,800,2000],[1800,1800,2500],[2200,800,3000]]],\"spatialReference\":{\"wkid\":3857}}";
Polyline polyline = PolylineBuilder.FromJson(json);

// extrude to a specific z value to create a multipatch
multipatch = GeometryEngine.Instance.ConstructMultipatchExtrudeToZ(polyline, 500);

Coordinate3D fromCoord = new Coordinate3D(50, 50, -500);
Coordinate3D toCoord = new Coordinate3D(200, 50, 1000);

// extrude between two coordinates to create a multipatch
multipatch = GeometryEngine.Instance.ConstructMultipatchExtrudeAlongLine(polyline, fromCoord, toCoord);
Requirements

Target Platforms: Windows 10, Windows 8.1

See Also

Reference

GeometryEngine Class
GeometryEngine Members