API for Logos 6

I wondering if there's an API for Logos 6 that software developers can use to integrate applications with Logos. Back a few years ago I looked into this and there was an API developer website on the main Logos.com website. That seems to have been removed.
Is the API still available? Can you point me to the right location to looking into this?
Best regards,
Jon Rothlander
Austin, Texas
Comments
-
The Logos COM API is documented here: https://wiki.logos.com/Logos_4_COM_API. That documentation was written when Logos 4 was the current version, but I have not heard that the API has been removed, so it probably still works the same way.
0 -
Yes, the COM API from version 4 is still there and seems to be working roughly the same. I'm currently using it to develop a Microsoft Office OneNote add-in integration to Logos6. In addition to the documentation sighted above, there is a .NET sample app here: https://wiki.logos.com/Logos_4_COM_API_Demo_Project that also compiles and runs quite easily. I even converted it to Visual Studio 2015 RC with not issues at all.
0 -
Any idea why the COM API seems have stopped working for me? It stopped about a week ago, right after I'd updated Logos software (currently running 6.6 SR-1 6.6.0.0059), and after upgrading from Win7 to Win10 about the same day. So I don't know if this has to do with a change in the Logos version or in the operating system itself.
I like to launch Logos with a specific desktop layout. For example, when I want to work on the book of Daniel, I launch Logos with the following Power Shell script:
$launcher = New-Object -com "LogosBibleSoftware.Launcher"
$launcher.LaunchApplication()do {} until ($logos = $launcher.Application)
$logos.LoadLayout("Daniel")The shortcut I use to run that script is:
%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -WindowStyle Hidden -File "C:\Users\ … Auto\PS1\Daniel.ps1"
Suddenly that has stopped working. Any idea what may have happened (and how to fix it)?
Doug
0 -
Are you getting a specific error or anything?
Can you try running your shortcut with the explicit path to PowerShell.exe instead of the environment variable of %SystemRoot% Not sure if that is the same or automatically registered in Win 10. Although I would think so.
Given PowerShell is the same version from 7 to 10 I'd think your command line switches should be fine.
The only other thing of off the top of my head without any error info is possibly the COM library registration got mucked up on the upgrade from 7 to 10.
I'll double check the Logos version I'm running, but I'm sure it's the latest and it's working for me on Win 10.
0 -
Thanks for this, Wade. No, there's no error message. Nothing (visible) happens - Logos doesn't start. I tried your suggestion and it didn't make any difference. I then made a copy of the folder and placed it in my "Documents" folder, and no difference. I copied the text from the "Properties" box of the shorcut and pasted that into a DOS window, to see if there would be any error messages reported there. After pasting
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -WindowStyle Hidden -File "C:\Users\Doug Trick\Documents\PS1\Daniel.ps1"
into the DOS box and hitting <enter>, again nothing happened (except that the DOS box closed).
Yes, I wonder if something got messed up in tTHECOM library registration at some point. I've tried reinstalling Logos 6 (to see if that would correct the library registration or whatever) but when I try to run the installer, it just says I already have the most recent version installed.
0 -
Doug Trick said:
Yes, I wonder if something got messed up in tTHECOM library registration at some point.
This seems likely, given the behaviour you've described. Try running the PowerShell script referenced in this post to repair the COM registration: https://community.logos.com/forums/p/105737/735038.aspx#735038
0 -
Thanks, Bradley. I wrestled with that (the above link) for quite a while, and eventually got PowerShell to accept commands on my Win10 system. And it eventually accepted the RegisterSmartTags.ps1 script. But when I try to run my script (to launch Logos with a specified "layout", it says:
I think something's not right with how Logos is registered on my system, so maybe I need to uninstall it and re-install it. (Hopefully I can do so without uninstalling the whole library.)
0 -
P.S. I uninstalled and re-installed Logos 6 yesterday, and Powershell worked fine (i.e., I could launch Logos from any one of several shortcuts which called on Powershell to load a .ps1 file which included a Logos "layout" name, and Logos would launch with that specific layout). But, after I rebooted my computer, it stopped working. Now, when I run any of the shortcuts, Logos does launch, and it loads the expected layout, but then after about 5 seconds, it crashes and I receive a popup window, "Logos Bible Software has stopped working. A problem caused the program to stop working correctly. Windows will close the program and notify you if a solution is available."
Here's an example of one of the .ps1 files, "Daniel.ps1":
$launcher = New-Object -com "LogosBibleSoftware.Launcher"
$launcher.LaunchApplication()do {} until ($logos = $launcher.Application)
$logos.LoadLayout("Daniel")And here's the command (in the "target" of the shortcut) that attempts to launch it:
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -WindowStyle Hidden -File "C:\Users\Doug Trick\Documents\PS1\Daniel.ps1"
Doug
0 -
P.P.S. Logos itself is running fine. If I bypass any shortcuts that call for Powershell, and simply run something like:
"E:\Logos\Logos.exe" logosres:nlt
it runs without any problems.
(By the way, could there be any issue with the fact that my hard drive has two partitions, and Logos is on the "E" partition? I shouldn't think so, but maybe it's worth mentioning.) - Doug
0 -
I've recreated your PowerShell script and saved it as Daniel.ps1 and created a Daniel layout in Logos and ran the script from the command line with the same switches and it runs as expected. Even after reboot.
Can you try right clicking on the PowerShell script file and select "Run with PowerShell"? That would at least isolate the issue a little more.
Also, have you looked in the Windows event log for any app crash data now that the app loads and then crashes? Just hit the Windows key and type "Event Viewer" and check in the Application node.
0 -
Thanks for all your efforts in this, Wade.
When I right-click on the script file, there isn't an option that explicitly says "Run with PowerShell", but there is an "Open With" option, (By the way, the "Open" option there on the right-click context menu simply opens the script in Notepad++ (my substitute for Windows Notepad).) Anyway, there are some options in the flyout menu for "Open With", namely (Windows) Notepad, Notepad++, and "Windows PowerShell". But when I select Windows PowerShell, an (almost full-screen) blue window opens up for about 2 seconds, then closes, and I receive a pop-up window, "How do you wand to open this file?" and a long list of programs, including "Windows Powershell". And if I select Windows Powershell in that pop-up, exactly the same thing happens again. (The large blue screen, which closes after a couple seconds, and the pop-up window reappears.) (By the way, the "blue screen" isn't the blue screen of death - it seems to be just a DOS or PowerShell window that uses a blue background by default.)
So when I try running the script my means of a right-click, and OpenWith / Powershell; EventViewer reports:
- <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">- <System><Provider Name="PowerShell" /><EventID Qualifiers="0">403</EventID><Level>4</Level><Task>4</Task><Keywords>0x80000000000000</Keywords><TimeCreated SystemTime="2015-10-06T18:08:12.000000000Z" /><EventRecordID>544</EventRecordID><Channel>Windows PowerShell</Channel><Computer>Port25</Computer><Security /></System>- <EventData><Data>Stopped</Data><Data>Available</Data><Data>NewEngineState=Stopped PreviousEngineState=Available SequenceNumber=15 HostName=ConsoleHost HostVersion=5.0.10240.16384 HostId=df157492-dfaf-4a32-b07c-82db6dbe2ee3 HostApplication=C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe C:\Users\Doug EngineVersion=5.0.10240.16384 RunspaceId=7e9e798b-3b72-4729-974f-16f87bd02343 PipelineId= CommandName= CommandType= ScriptName= CommandPath= CommandLine=</Data></EventData></Event>When I was attempting to launch Logos from the shortcut (which then called PowerShell and the script as an argument), this is what EventViewer reports the following:
- <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">- <System><Provider Name="PowerShell" /><EventID Qualifiers="0">400</EventID><Level>4</Level><Task>4</Task><Keywords>0x80000000000000</Keywords><TimeCreated SystemTime="2015-10-06T15:45:28.000000000Z" /><EventRecordID>479</EventRecordID><Channel>Windows PowerShell</Channel><Computer>Port25</Computer><Security /></System>- <EventData><Data>Available</Data><Data>None</Data><Data>NewEngineState=Available PreviousEngineState=None SequenceNumber=13 HostName=ConsoleHost HostVersion=5.0.10240.16384 HostId=8a43bd17-f5c1-435d-a1ff-1cef546f4567 HostApplication=C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -WindowStyle Hidden -File C:\Users\Doug Trick\Documents\PS1\Daniel.ps1 EngineVersion=5.0.10240.16384 RunspaceId=c8e2126a-e157-4c02-b7b4-c998b9e1c7c0 PipelineId= CommandName= CommandType= ScriptName= CommandPath= CommandLine=</Data></EventData></Event> Wade Wickman said:I've recreated your PowerShell script and saved it as Daniel.ps1 and created a Daniel layout in Logos and ran the script from the command line with the same switches and it runs as expected. Even after reboot.
Can you try right clicking on the PowerShell script file and select "Run with PowerShell"? That would at least isolate the issue a little more.
Also, have you looked in the Windows event log for any app crash data now that the app loads and then crashes? Just hit the Windows key and type "Event Viewer" and check in the Application node.
0 -
No problem. I find it very curious as there is no reason for this behavior and I cannot reproduce it. I wish I was more helpful though.
I have some Microsoft developer tools installed and that's probably why I have the right click context menu option to directly run PowerShell scripts. The default text editor opening when selecting Open from the context menu is normal. Windows expects that you want to edit the script as opposed to running it.
The event logs look normal. Did you happen to scroll through the informational events and see any actual error events? They would be marked with a red exclamation point icon. Especially any with the source being Logos. Even check back a day or two in the logs. You could check the security node as well. All though I'd be surprised to see something there.
0 -
Hi, Wade. OK, here's what I get when I try to launch Logos via Powershell and a script. There's a .NET Runtime error, followed a second later by Application Error:
.NET Runtime
- <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">- <System><Provider Name=".NET Runtime" /><EventID Qualifiers="0">1026</EventID><Level>2</Level><Task>0</Task><Keywords>0x80000000000000</Keywords><TimeCreated SystemTime="2015-10-08T01:45:58.000000000Z" /><EventRecordID>4571</EventRecordID><Channel>Application</Channel><Computer>Port25</Computer><Security /></System>- <EventData><Data>Application: Logos.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception Info: System.ObjectDisposedException Stack: at Libronix.Utility.ViewModels.TiledFramePanel.VerifyNotDisposed() at LDLS4.Panels.ResourcePanel.ResourceViewModel.OnCreateDisplay() at LDLS4.Panels.ResourcePanel.ResourceViewModel.Initialize() at LDLS4.Panels.ResourcePanel.ResourcePanelViewModel.set_ResourceViewModel(LDLS4.Panels.ResourcePanel.ResourceViewModel) at LDLS4.Panels.ResourcePanel.ResourcePanelViewModel.<UpdateResourceViewModels>b__12(System.String) at System.Linq.Enumerable+WhereSelectEnumerableIterator`2[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].MoveNext() at System.Collections.Generic.List`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]..ctor(System.Collections.Generic.IEnumerable`1<System.__Canon>) at System.Linq.Enumerable.ToList[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.Collections.Generic.IEnumerable`1<System.__Canon>) at Libronix.Utility.EnumerableUtility.ToReadOnlyCollection[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.Collections.Generic.IEnumerable`1<System.__Canon>) at LDLS4.Panels.ResourcePanel.ResourcePanelViewModel.UpdateResourceViewModels(System.Collections.ObjectModel.ReadOnlyCollection`1<System.String>) at LDLS4.Panels.ResourcePanel.ResourcePanelViewModel.CreateResourceViewModelsWhenReady() at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32) at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate) at System.Windows.Threading.DispatcherOperation.InvokeImpl() at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object) at System.Windows.Threading.DispatcherOperation.Invoke() at System.Windows.Threading.Dispatcher.ProcessQueue() at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef) at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef) at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object) at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32) at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate) at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32) at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr) at MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef) at MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef) at System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame) at System.Windows.Application.RunDispatcher(System.Object) at System.Windows.Application.RunInternal(System.Windows.Window) at LDLS4.OurApp.InitializeAndRun(System.Collections.ObjectModel.ReadOnlyCollection`1<System.String>, Libronix.Utility.Threading.SingleInstanceManager) at LDLS4.OurApp.Main(System.String[])</Data></EventData></Event>Application Error:- <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">- <System><Provider Name="Application Error" /><EventID Qualifiers="0">1000</EventID><Level>2</Level><Task>100</Task><Keywords>0x80000000000000</Keywords><TimeCreated SystemTime="2015-10-08T01:45:59.000000000Z" /><EventRecordID>4572</EventRecordID><Channel>Application</Channel><Computer>Port25</Computer><Security /></System>- <EventData><Data>Logos.exe</Data><Data>6.6.0.59</Data><Data>56048e90</Data><Data>KERNELBASE.dll</Data><Data>10.0.10240.16384</Data><Data>559f38c3</Data><Data>e0434352</Data><Data>000000000002a1c8</Data><Data>2e7c</Data><Data>01d1016b05409f99</Data><Data>E:\Logos\6.6.0.0059\Logos.exe</Data><Data>C:\WINDOWS\system32\KERNELBASE.dll</Data><Data>aba13960-543e-497e-8ba0-ffb66fac924a</Data><Data /><Data /></EventData></Event>Does anything there give a clue to what the problem is? - Doug0 -
Hi Doug,
Well, the only thing I can say for sure is the error is very deep inside the application (Logos) call stack. The Logos developers are going to have to take a look at this one. And I'm guessing it will be tough to track down because of how deep inside the application it is.
It seems to have something to do with their panel layout logic as they are looping through the collection of panels to open them within the window. But that is just a wild guess without knowing the codebase.
The other difficulty is that it seems to be environmental in that I cannot reproduce it on any other machine. So there is some version of some software library on your machine that is different than my machines. And without cataloging and comparing things at a very detailed level, it will be difficult to say what it is.
I'm on the Windows early adopter list for updates so it's possible that I have some update/patch that you don't. And that it will get fixed automatically when that patch reaches the mainstream. But that is probably wishful thinking.
So the only advice I can give is to ensure Windows is up to date and you have the latest Logos update. And/or try reinstalling if you haven't already. And maybe the Faithlife engineers can look at that error callstack and figure it out.
Sorry I couldn't be of more help.
0 -
OK, well thanks a lot for trying. I really appreciate your patience and perseverence. Maybe your wishful thinking will come true; if not, I can just manually choose the layout I need each time the program loads.
0