Logos 4 COM API

Wiki: TOC, VTOC, Home
Forum: Home, General



Logos 4 exposes a limited COM API to support third-party programs that need to interact with the desktop software.

Basic Information

If not otherwise described, components named XyzCollection represent collections of Xyz instances. A collection has an integer Count property that returns the number of items in the collection, and an indexed Item property that returns the item at the specified zero-based index. Each collection is also enumerable.

All properties are read-only unless otherwise specified.

Data type aliases are given in the list of data types. Languages are specified using ISO 639-1 codes.

See also How to Use the COM API and Logos 4 COM API Demo Project.

Version History

Version 1 of the API was introduced with Logos 4.0d. Version 2 was introduced with Logos 4.1. Version 3 was introduced with Logos 4.2.

This document describes version 3 of the API. Properties and methods that were introduced in versions 2 and 3 are marked as such in this document; all other properties and methods were present in version 1. Applications that use a version 2 or 3 property must check the Application.ApiVersion property and verify that it is greater than or equal to the version they require.

LogosLauncher

LogosBibleSoftware.LogosLauncher is a creatable COM component that can launch Logos4.exe and/or provide access to the Logos 4 COM API.

The application is not ready until after the user has logged in successfully, the main window has appeared, and any startup operations have completed.

Properties

Application : LogosApplication
Returns the Application object of the Logos 4 COM API, or null if Logos 4 is not running or not yet ready.

Methods

LaunchApplication([CommandLineArguments : String])
Launches Logos 4, using the optional command-line arguments. This method does not block until the Application property is ready, so the client will need to poll that property until it is non-null.

LogosApplication

The application can be accessed from the LogosBibleSoftware.Launcher when Logos 4 is running and ready.

Properties

ApiVersion : Integer
Returns the version of this API that is supported by the application. Client applications should check that the ApiVersion property returns an integer greater than or equal to the API version against which they were designed. The current API version is 3.
DataTypes : LogosDataTypes
The supported data types.
Library : LogosLibrary
The library of resources.
CopyBibleVerses : LogosCopyBibleVerses
[API Version 2] The Copy Bible Verses component (not the panel).

Methods

Activate()
Activates the Logos 4 application window.
ExecuteUri(Uri : String)
Executes the specified URI of a supported protocol, e.g. logos4 or logosref.
CreateNavigationRequest() : LogosNavigationRequest
Creates a navigation request.
Navigate(Request : LogosNavigationRequest)
Navigates according to the specified request.
GetActivePanel() : LogosPanel
Returns the active panel, if any.
GetOpenPanels() : LogosPanelCollection
Returns a snapshot of the currently open panels, most recently activated first.
GetPanel(PanelId : String) : LogosPanel
Returns the panel with the specified ID.
Exit()
Exits the application.
LoadLayout(LayoutName : String) : Boolean
[API Version 3] Loads the layout with the specified name (or does nothing if there is no layout with that name). Returns true if the named layout was found and loaded.
SaveLayout(LayoutName : String)
[API Version 3] Saves the current layout with the specified name. Any existing layout with that name is overwritten.

Events

PanelOpened(Panel : Object)
Raised when a panel has opened. Panel is always a LogosPanel object.
PanelActivated(Panel : Object)
Raised when a panel is activated. Panel is a LogosPanel object or null if there are no open panels.
PanelChanged(Panel : Object, Reserved : Object)
Raised when a panel has changed, e.g. the current reference has changed, the selection has changed, etc. Panel is always a LogosPanel object; Reserved is always null. The panel changes that cause this event vary by panel kind. Each client is responsible for ignoring any events that don’t correspond to a change that is relevant to it, e.g. by checking to see if GetCurrentReferencesAndHeadwords returns something different than before.
PanelClosed(Panel : Object)
Raised when a panel is closed. Panel is always a LogosPanel object.
Exiting()
Raised when the application is about to exit. Subsequent operations on the application will fail.

LogosPanel

A panel displayed by the application.

Properties

Kind : String
The kind of panel, e.g. “Resource”.
Title : String
The title of the panel.
LinkSet : String
The link set of the panel, e.g. “None”, “Index:1” (link set A), or “Active” (follow).
IsOpen : Boolean
True if the panel is open.
Details : Object
An object that exposes details specific to this kind of panel; null if not supported. For example, if DetailsKind is Resource then the object can be cast to a LogosResourcePanelDetails.
DetailsKind : String
[API Version 2] The type of the object returned from the Details property, or null if none. The possible values are: Resource.

Methods

GetCurrentReferencesAndHeadwords() : LogosReferenceOrHeadwordCollection
The current references and headwords, if any.
Navigate(Request : LogosNavigationRequest)
Navigates according to the specified request, if possible.

LogosResourcePanelDetails

The object returned from the Details property of a “Resource” panel.

Properties

ResourceId : String
The resource ID being displayed by the panel.

LogosReferenceOrHeadword

A reference or headword.

Properties

Reference : LogosDataTypeReference
The reference.
Headword : String
The headword.
HeadwordLanguage : String
The headword language.

LogosNavigationRequest

A navigation request is used to navigate the application or a specific resource panel.

Properties

ResourceId : String
The ID of the resource to navigate. [read/write]
Article : String
The destination article in the resource. Requires a valid ResourceId. [read/write]
Reference : LogosDataTypeReference
The destination data type reference. [read/write]
Headword : String
The destination headword. [read/write]
HeadwordLanguage : String
The language code of the headword, e.g. “en”. [read/write]

LogosDataTypes

The supported data types.

Methods

GetDataType(Alias : String) : LogosDataType
Returns the data type with the specified alias.
LoadReference(Text : String) : LogosDataTypeReference
Loads a data type reference from a string.

LogosDataType

A supported data type.

Properties

Alias : String
The primary alias of the data type, e.g. “BibleESV”. (See list of data types.)
Title : String
The title of the data type.
SortTitle : String
The sort title of the data type.
AbbreviatedTitle : String
The abbreviated title of the data type.
Details : Object
An object that exposes details specific to this data type; null if not supported. For example, if DetailsKind is Bible then this object can be cast to a LogosBibleDataTypeDetails.
DetailsKind : String
[API Version 2] The type of the object returned from the Details property, or null if none. The possible values are: Bible.

Methods

ParseReference(Text : String) : LogosDataTypeReference
Parses the text into a data type reference.
ScanForReferences(Text : String) : LogosParsedDataTypeReferenceCollection
[API Version 2] Scans the text for references (for this data type) and returns a collection of all that were found (or null if this data type does not support scanning).

LogosDataTypeReference

A data type reference.

Properties

DataType : LogosDataType
The data type of the reference.
IsRange : Boolean
True if the reference is a range.
RangeStart : LogosDataTypeReference
The start reference of a range (or the same reference if it is not a range).
RangeEnd : LogosDataTypeReference
The end reference of a range (or the same reference if it is not a range).
Details : Object
An object that exposes details specific to this type of data type reference; null if not supported. For example, if the DetailsKind is Bible then this object can be cast to a LogosBibleReferenceDetails.
DetailsKind : String
[API Version 2] The type of the object returned from the Details property, or null if none. The possible values are: Bible.

Methods

Render([Style : String]) : String
Renders the reference in “short”, “medium”, “long”, or “display” form (default “long”).
Save() : String
Saves a data type reference to a string (using URI form).
IsEqualTo(Reference : LogosDataTypeReference) : Boolean
Returns true if the references are equal.
CompareTo(Reference : LogosDataTypeReference) : Integer
Returns a negative integer if the reference is less than the specified reference, a positive integer if the reference is greater than the specified reference, or zero if the references are equal.
Intersects(Reference : LogosDataTypeReference) : Boolean
Returns true if the references intersect.

LogosParsedDataTypeReference

[API Version 2] A data type reference parsed from text.

Properties

Reference : LogosDataTypeReference
The data type reference that was found.
TextIndex : Integer
The zero-based index in the text at which this reference was found.
TextLength : Integer
The length of the source text from which this reference was parsed.

LogosBibleDataTypeDetails

The details exposed by Bible data types.

Properties

FirstBook : LogosDataTypeReference
The first book of the Bible.
LastBook : LogosDataTypeReference
The last book of the Bible.

LogosBibleReferenceDetails

The details exposed by Bible references.

Properties

Book : String
The Bible book, e.g. “Ge” or “1Sa” as per the Bible Book Abbreviations list.
Chapter : String
The chapter. Usually an integer (e.g. “1”), but could be a letter (e.g. “A”) or a number-letter (e.g. “1A”) or a special value like “Title”.
Verse : String
The verse. Usually an integer (e.g. “1”), but could be a number-letter (e.g. “1a”) or a special value like “Title”.
FirstBook : LogosDataTypeReference
The first book that intersects the Bible reference.
LastBook : LogosDataTypeReference
The last book that intersects the Bible reference.
PreviousBook : LogosDataTypeReference
The book before FirstBook, if any.
NextBook : LogosDataTypeReference
The book after LastBook, if any.
FirstChapter : LogosDataTypeReference
The first chapter that intersects the Bible reference.
LastChapter : DataTypeReference
The last chapter that intersects the Bible reference.
PreviousChapter : LogosDataTypeReference
The chapter before FirstChapter, if any.
NextChapter : LogosDataTypeReference
The chapter after LastChapter, if any.
FirstVerse : LogosDataTypeReference
The first verse that intersects the Bible reference.
LastVerse : DataTypeReference
The last verse that intersects the Bible reference.
PreviousVerse : LogosDataTypeReference
The verse before FirstVerse, if any.
NextVerse : LogosDataTypeReference
The verse after LastVerse, if any.

LogosLibrary

The library of resources.

Methods

GetResourceInfo(ResourceId : String) : LogosResourceInfo
Returns resource information for the specified resource, or null if that resource could not be found.
GetResourcesByResourceType(ResourceType : String) : LogosResourceInfoCollection
Returns resource information for resources of the specified type, e.g. “text.monograph.bible”. See list of resource types.
GetResourcesMatchingQuery(Query : String) : LogosResourceInfoCollection
Returns resource information for resources that match the specified query. The query should be a library filter, as used by the Library panel or Collections tool.

LogosResourceInfo

Information about a resource.

Properties

ResourceId : String
The resource ID.
Version : String
The version of the resource.
Title : String
The title of the resource.
AbbreviatedTitle : String
The abbreviated title of the resource.
ResourceType : String
The type of the resource. See list of resource types.

LogosCopyBibleVerses

[API Version 2] The core Copy Bible Verses functionality (as opposed to the UI panel).

Methods

CreateRequest() : LogosCopyBibleVersesRequest
Creates a LogosCopyBibleVersesRequest object.
GetText(Request : LogosCopyBibleVersesRequest) : String
Returns the plain text obtained by invoking Copy Bible Verses on the reference in the specified request, using the user’s preferred Bible and the last-selected style in the Copy Bible Verses panel.

LogosCopyBibleVersesRequest

[API Version 2] A request for copying verses.

Properties

Reference : LogosDataTypeReference
The reference to be used by Copy Bible Verses; this must be a Bible reference.


Logos Bible Software Wiki

Welcome, Guest! (sign in)