Application: CreateTrianglesTopography
Revit Platform: Architecture
Revit Version: 2019.2
First Released For: 2019.2
Programming Language: C#
Skill Level: Beginning
Category: Elements
Type: ExternalCommand

Subject: Create triangles topography surface
Summary: This sample will demonstrate how to creates a new topography surface element from triangle points and triangle facets.

Classes: 
Autodesk.Revit.UI.IExternalCommand
Autodesk.Revit.DB

Project Files: 
Command.cs
It contains the class Command which inherits from interface IExternalCommand and implements the Execute method to invoke the TopographySurface.Create API method to create triangles topography surface.
TrianglesData.cs
This file contains two classes, TrianglesData and XYZConverter. 
The TrianglesData parses all triangle points and triangle facets stored in the TrianglesData.json file. These points and facets are passed to Revit API method to create triangles topography surface.
The XYZConverter is used to convert Revit XYZ class by JavaScriptSerializer.
TrianglesData.json
This file contains all the points and facets data which can be used to define a topography surface. And the content of this json file can be deserialized to an object of TrianglesData class.

Description: 
This sample provides one external command “Create Triangles Topography”, which reads all points and facets data from the TrianglesData.json file and creates one triangles topography surface.

Instructions: 
1.	Create Triangles Topography
a.   Open Revit application, new a project and execute the command.
b.   Execute the command.
c.   Go to default 3D view, and zoom to fit to see the created topography surface