Loads the specified map document into the PageLayout contained by the PageLayoutControl.
[Visual Basic .NET] Public Sub LoadMxFile ( _ ByVal fileName As String, _ [ByVal password As Object] _ )
[C#] public void LoadMxFile ( string fileName, object password );
Optional Values
[C++]
HRESULT LoadMxFile(
BSTR fileName,
VARIANT password
);
[C++]Parameters
fileName [in] fileName is a parameter of type BSTR password [optional] password is a parameter of type VARIANTTo indicate this parameter is undefined pass in a VARIANT with type VT_ERROR and scode value of DISP_E_PARAMNOTFOUND.
Product Availability
Description
Loads an map document into the PageLayoutControl. The map document can be an ArcMap document, an ArcMap template or an ArcReader document. Use the CheckMxFile method to determine if the specified map document is a valid map document.
Remarks
When LoadMXfile is used the user may be prompted for a password; refer to the tables below to determine when this may occur. Additionally, password prompts may be given if accessing MapDocuments using either the PageLayoutControl's PropertyPage, ArcMap or ArcReader; the tables also show in what circumstances this will occur.
Loading Map Documents (*.mxd, *.mxt, *.pmf) which reference IMS Services (with and without security)
Application | No Secure Services MXD/ MXT/ PMF files | Secure Servcies MXD/ MXT/ PMF files | Secure Servcies (password cached) MXD/ MXT files | Secure Servcies (password cached) PMF files |
---|---|---|---|---|
PageLayoutControl (programmatically) | No Prompt | Prompt | No Prompt | Prompt |
PageLayoutControl (property pages) | No Prompt | Prompt | No Prompt | Prompt |
ArcMap | No Prompt | Prompt | No Prompt | Prompt |
ArcReader (PMF files only) | No Prompt | Prompt | N/A | No Prompt |
* The Connection to the Internet server must have the Save User/ Password setting enabled. This can be set, for example, when using Add Internet Server in the Add Layers Dialog. Additionally, in the case of PMF files the ArcPublisher Cache password in PMF file setting must be enabled.
Loading Published Map Files (*.pmf) (with and without password protection)
Application | PMF with No Password | PMF with Password |
---|---|---|
PageLayoutControl (programmatically) | No Prompt | Supply in Code |
PageLayoutControl (property pages) | No Prompt | Prompt |
ArcMap | No Prompt | Prompt |
ArcReader | No Prompt | Prompt |