AnalysisApplication OpenFromLibrary Method (String, String, DocumentOpenSettings) TIBCO Spotfire 6.0 API Reference
Opens a file from the TIBCO Spotfire Server library with a known name located at a known path.

Namespace: Spotfire.Dxp.Application
Assembly: Spotfire.Dxp.Application (in Spotfire.Dxp.Application.dll) Version: 13.19.7018.3940 (13.19.7018.3940)
Syntax

[ObsoleteAttribute("Use Open(LibraryItem, DocumentOpenSettings) instead.")]
public virtual bool OpenFromLibrary(
	string path,
	string name,
	DocumentOpenSettings settings
)

Parameters

path
Type: System String
The path of the directory in which the entry to open is located.
name
Type: System String
The name of the library entry to open.
settings
Type: Spotfire.Dxp.Application DocumentOpenSettings
Controls how the document is opened.

Return Value

Type: Boolean
true if the document was loaded; otherwise false.
Exceptions

ExceptionCondition
Spotfire.Dxp.Framework.Library LibraryException no matching saved library entry with the given path and name is found.
-or-
the given document is not a valid TIBCO Spotfire analysis file.
-or-
the file contains linked data to import, but the import fails.
-or-
a communication error occurs when reading the document from the Library.
System InvalidOperationException This method is not called from the application main thread.
Spotfire.Dxp.Framework.ApplicationModel CanceledException If the opening of the file is canceled by the user.
System ArgumentNullException One of the arguments are null.
System NotSupportedException This method is called in the Spotfire Web Player.
Remarks

This operation by default is not executed with progress, that is, no progress dialog is shown while the current document is being read from the library. Note that if the document in the library requires any prompting the prompts will be suppressed unless this operation is executed with progress.

This method is not supported in the Spotfire Web Player. Calling it there will cause a NotSupportedException to be thrown.

Examples

To execute without progress:
string path="/DXP Files/Sales";
string name="Sales February";
DocumentOpenSettings settings = new DocumentOpenSettings()
bool loaded = application.OpenFromLibrary(path, name, settings);
string path="/DXP Files/Sales";
string name="Sales February";
DocumentOpenSettings settings = new DocumentOpenSettings()
ProgressService progressService = application.GetService<ProgressService>();
progressService.ExecuteWithProgress("Opening from Library", "Opening " + name, delegate()
{
    bool loaded = application.OpenFromLibrary(path, name, settings);
});
To execute with progress and prompts:
See Also