ArcObjects Library Reference (PublisherControls)  

IARControlDefault.LoadDocument Method

Loads the Published Map File (*.PMF) into the control.

[Visual Basic .NET]
Public Sub LoadDocument ( _
    ByVal sFilename As String, _
    [ByVal sPassword As String] _
)
[C#]
public void LoadDocument (
    string sFilename,
    string sPassword
);
[C#]

Optional Values

sPassword   Supply as a default value.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Description

Loads the specified Published Map File (*.pmf) into the ArcReaderControl. Use the CheckDocument method to determine if the specified Published Map File can be loaded successfully.

If a document was password protected when it was published, the user will be prompted automatically for a password, if the password is not passed within the LoadDocument method. If an incorrect password is supplied twice in succession a custom error will be returned.

If a document in successfully loaded the CurrentView and the CurrentARTool will be set. The default CurrentARTool  is specified by the ‘DefaultDataTool’ and ‘DefaultLayoutTool’ settings in the ARConfiguration. The DocumentFilename property will update itself with the path and filename of the currently loaded document, and the DocumentComment property to update itself with any comments that were supplied by the publisher of the document.

Errors Returned

2006 800A07D6: The specified document is not supported 

2007 800A07D7: The specified password is invalid 

2009 800A07D9: The timeout date is corrupt 

2010 800A07DA: The specified document has timed out

2011 800A07DB: The document time out type is invalid 

2110 800A083E: The current document does not have permission to be loaded into a customized ArcReader

Remarks

The LoadDocument method triggers the following events:

OnDocumentLoaded
OnCurrentViewChanged
OnBeforeScreenDraw
OnAfterScreenDraw

See Also

IARControlDefault Interface