Object Model Overview
The following figure describes the main interfaces made
available by the STK Esri Display Library, and their
IAgEsri3dRendererFactory interface and
associated class provide access to the renderer (IAgEsri3dRenderer
interface) for a specific 3D view via the
Once you get to the IAgEsri3dRenderer interface, you can:
- configure the renderer (Config
- open/close map documents (OpenMapDocument,
- access the opened map document for manipulation using
ArcObjects (MapDocument property),
- manage the GIS selection (ClearSelection,
Select Features methods),
- manage the display (Refresh,
- identify GIS features by using a specialized helper function on
top of the regular Arc engine's Identify capability (Identify
- promote GIS features to STK objects (Promote
- optimize cross-thread communication (DrawPause/DrawResume
- make changes to the map document on the fly (StartMapEditing/StopMapEditing
class also provides the following events:
The threading architecture has several implications for how to
interact with the Library programmatically:
- All the components in the library are apartment-threaded.
- All the components except for the context live in the main user
- The context (IAgEsri3dRendererContext
interface) lives in the GIS thread/apartment.
- The ArcObjects components are apartment-threaded as well. It is
recommended that you instantiate new ArcObjects in the GIS thread.
This can be achieved by using the
CreateObject method of the IAgEsri3dRendererContext interface
(this is conceptually similar to the IServerContext interface when
working with ArcGIS server).
- It is recommended that you avoid chatty calls between the 2
threads, and instead use coarse grained interfaces to limit the
number of marshalling round trips.
- In case chatty programming style cannot be avoided, use the
DrawResume methods of the IAgEsri3dRenderer interface to speed
up round trips between the 2 threads. These methods basically
suspend the draw processing temporarily in the GIS thread, so that
it is only listening to incoming calls.
- Alternatively you can serialize components in order to perform
all the processing in a different thread. The LoadObject and
SaveObject methods of the IAgEsri3dRendererContext interface serve
that purpose (similarly to the
SaveObject methods of the IServerContext interface when working
with ArcGIS server).
STK 11.2.1 Programming Interface