How to use
See How to use ArcGIS samples for help on compiling, setting up the debugger, and running the sample. If the sample has associated data, you will find that the sample's zip file includes a "data" folder alongside the language folders. However, you will need to update the sample to point to the location of the data once you have extracted all the files.
Running the sample
- Start Visual Studio.
- Click Debug and click Start Debugging, or compile the sample and run the created .exe file.
Using the sample
- When the sample starts, you will see x-, y-, z-axes rendered in an embedded SceneControl and buttons on the right side of the form.
- Click a button on the right side of the Windows form's user interface (UI) to render the selected example in the embedded SceneControl with the x-, y-, z-axes (left in place to clarify where the multipatch is positioned in 3D space). The geometry is rendered with a solid fill color and the outline that makes up the multipatch geometry is rendered for illustrative purposes.
- The header for the sections of buttons indicates the type of geometry that is rendered, and each of the numbered buttons corresponds to a different example of that type of geometry. For example, clicking the 1 button on the Composite section shows two cylinders and two pyramids. Clicking the 3 button on the Composite section results in the house shown in the following illustration. Each click clears the screen allowing the recently clicked item to appear.
- To rotate the displayed multipatch, click and drag the SceneControl. Move left and right to move around in the same horizontal plane, and move the mouse pointer up and down to rotate vertically.
- To zoom out, right-click and hold down the mouse button while moving the mouse pointer away from you.
- To zoom in, right-click and hold down the mouse button while moving the mouse pointer towards you. See the following illustration:
Additional information
If you are working in a 2D environment, the code to create the multipatch items are the same. Write your class to draw them, as the one used in this example draws in 3D. If you are working in 2D with these multipoint items, no extension (neither 3D Analyst for ArcGIS for Desktop Basic, ArcGIS for Desktop Standard, and ArcGIS for Desktop, nor 3D for ArcGIS Engine) is required.
MultiPatchExamples/ColorUtilities.cs | Color utilities implementation. |
MultiPatchExamples/CompositeExamples.cs | Composite examples implementation. |
MultiPatchExamples/DrawUtilities.cs | Draw utilities implementation. |
MultiPatchExamples/ElementUtilities.cs | Element utilities implementation. |
MultiPatchExamples/ExtrusionExamples.cs | Extrusion examples implementation. |
MultiPatchExamples/GeometryUtilities.cs | Geometry utilities implementation. |
MultiPatchExamples/GraphicsLayer3DUtilities.cs | Graphics layer 3D utilities implementation. |
MultiPatchExamples/MultiPatchExamples.cs | MultiPatch examples implementation. |
MultiPatchExamples/MultiPatchExamples.Designer.cs | MultiPatch examples designer implementation. |
MultiPatchExamples/Program.cs | Program implementation. |
MultiPatchExamples/RingExamples.cs | Ring examples implementation. |
MultiPatchExamples/RingGroupExamples.cs | Ring group examples implementation. |
MultiPatchExamples/Transform3DExamples.cs | Transform 3D examples implementation. |
MultiPatchExamples/TriangleFanExamples.cs | Triangle fan examples implementation. |
MultiPatchExamples/TrianglesExamples.cs | Triangles examples implementation. |
MultiPatchExamples/TriangleStripExamples.cs | Triangle strip examples implementation. |
MultiPatchExamples/Vector3DExamples.cs | Vector 3D examples implementation. |
MultiPatchExamples/ColorUtilities.vb | Color utilities implementation. |
MultiPatchExamples/CompositeExamples.vb | Composite examples implementation. |
MultiPatchExamples/DrawUtilities.vb | Draw utilities implementation. |
MultiPatchExamples/ElementUtilities.vb | Element utilities implementation. |
MultiPatchExamples/ExtrusionExamples.vb | Extrusion examples implementation. |
MultiPatchExamples/GeometryUtilities.vb | Geometry utilities implementation. |
MultiPatchExamples/GraphicsLayer3DUtilities.vb | Graphics layer 3D utilities implementation. |
MultiPatchExamples/MultiPatchExamples.vb | MultiPatch examples implementation. |
MultiPatchExamples/MultiPatchExamples.Designer.vb | MultiPatch examples designer implementation. |
MultiPatchExamples/Program.vb | Program implementation. |
MultiPatchExamples/RingExamples.vb | Ring examples implementation. |
MultiPatchExamples/RingGroupExamples.vb | Ring group examples implementation. |
MultiPatchExamples/Transform3DExamples.vb | Transform 3D examples implementation. |
MultiPatchExamples/TriangleFanExamples.vb | Triangle fan examples implementation. |
MultiPatchExamples/TrianglesExamples.vb | Triangles examples implementation. |
MultiPatchExamples/TriangleStripExamples.vb | Triangle strip examples implementation. |
MultiPatchExamples/Vector3DExamples.vb | Vector 3D examples implementation. |
Download the files for all languages
See Also:
How to create a multipatch using a series of trianglesDevelopment licensing | Deployment licensing |
---|---|
Engine Developer Kit | ArcGIS for Desktop Basic: 3D Analyst |
ArcGIS for Desktop Standard: 3D Analyst | |
ArcGIS for Desktop Advanced: 3D Analyst | |
Engine: 3D Analyst |