AGI STK Esri Display 11 Send comments on this topic.
CloseMapDocument Method (IAgEsri3dRenderer)
See Also  Example
Option





Description

Closes the map document.

Syntax

[Visual Basic .NET]
Public Function CloseMapDocument( _
   ByVal Option As AgESTKesriCallOptions _
) As Boolean

[C#]
public bool CloseMapDocument(
AgESTKesriCallOptions Option
);

[Managed C++]
public: bool CloseMapDocument(
AgESTKesriCallOptions Option
);

[Java]
public bool closeMapDocument(
AgESTKesriCallOptions Option
);

[Unmanaged C++]
public: HRESULT CloseMapDocument(
AgESTKesriCallOptions Option,
VARIANT_BOOL * ReturnValue
);

Parameters

Option
Member Value Description
eEsri3dBlocking 1 The call to the method will block until the map is closed. Use for in-process calls.
eEsri3dNonBlocking 2 The call to the method will not block. Use for out-of-process calls. Loop until the call succeeds.

Return Type

Returns true if the map document has been closed successfully.

Remarks

How to call this function depends on how the library is being used:

  • If the library is being used embedded in a custom application, call the method passing the eEsri3dBlocking option. The function call will then block until the map document is closed, and then return.
  • If the library is being used to automate STK and is called from another process, it is recommended to use the eEsri3dNonBlocking option. The function will then return immediately, and must be called in a loop until it returns true.

Example

In a custom application embedding the STK/X controls.
[C#] Copy Code
renderer.CloseMapDocument(AgESTKesriCallOptions.eEsri3dBlocking);
In an out-of-process application automating STK.
[C#] Copy Code
while (!renderer.CloseMapDocument(AgESTKesriCallOptions.eEsri3dNonBlocking)) 

    Application.DoEvents(); 


In an out-of-process script automating STK.
[Perl] Copy Code
while (!$renderer->CloseMapDocument(2)) 


See Also

© 2016 Analytical Graphics, Inc. All Rights Reserved.

STK Programming Interface 11.0.1