AnalysisApplicationOpenFromLibrary Method (String, String)

Spotfire 14.3 API Reference

Note: This API is now obsolete.

Opens a file from the 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: 65.0.19510.3242 (65.0.19510.3242)
Syntax

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

Parameters

path
Type: SystemString
The path of the directory in which the entry to open is located.
name
Type: SystemString
The name of the library entry to open.

Return Value

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

ExceptionCondition
NotSupportedException This method is called in the Spotfire Web Player.
LibraryException no matching saved library entry with the given path and name is found.
-or-
the given document is not a valid 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.
CanceledException If the opening of the file is canceled by the user.
InvalidOperationException This method is not called from the application main thread.
ArgumentNullException One of the arguments are null.
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";
bool loaded = application.OpenFromLibrary(path, name);
To execute with progress and prompts:
string path="/DXP Files/Sales";
string name="Sales February";
ProgressService progressService = application.GetService<ProgressService>();
progressService.ExecuteWithProgress("Opening from Library", "Opening " + name, delegate()
{
    bool loaded = application.OpenFromLibrary(path, name);
});
Version Information

Obsolete (compiler warning) in 14.3
Obsolete (compiler warning) in 14.2
Obsolete (compiler warning) in 14.1
Obsolete (compiler warning) in 14.0
Obsolete (compiler warning) in 12.5
Obsolete (compiler warning) in 12.4
Obsolete (compiler warning) in 12.3
Obsolete (compiler warning) in 12.2
Obsolete (compiler warning) in 12.1
Obsolete (compiler warning) in 12.0
Obsolete (compiler warning) in 11.8
See Also

Reference