<img height="1" width="1" src="https://www.facebook.com/tr?id=1902375720037756&amp;ev=PageView &amp;noscript=1">
post-header.png

Symphony Profiler Workstation API

The Symphony Profile Workstation component now exposes an API for programmatic control by 3rd parties (Symphony Profiler 1.0.4.31 or above).

The API is still in it's infancy, and we are interested in hearing from developers

who would like to see extended integration points (email us at support@trumpetinc.com).

Here is an example (in VBA code) showing how to use the API

to prompt the user to create a new reservation, while pre-populating some of the

profile fields:

Option Explicit

' This example uses late binding.  You can also use 
early binding by including ' a reference to "Symphony Profiler Workstation Type
Library" in your project Public Sub exerciseShowReservationDialog() ' first, set up a WDReservationInfo object with the
default values you want the Save As dialog to display ' if you want to use the user's defaults, just
create the info object and don't populate it Dim info As Object Set info = CreateObject
("SymphonyProfiler4WD.WDReservationInfo") ' Due to the vagaries of the Worldox API,
the PG # you need to specify here is one more than ' the number that appears in wdadmin -
so the following entry refers to PG 20 as displayed in wdadmin info.pgid = 21 info.Description = "test desc" info.field1 = "code1" info.field2 = "code2" info.field3 = "code3" info.field4 = "code4" info.field5 = "code5" info.field6 = "code6" info.field7 = "code7" ' Next, connect to the Symphony Profiler 4 WD application Dim app As Object Set app = CreateObject("SymphonyProfiler4WD.Application") ' Then request that it show the reservation
dialog, with the default save as dialog values specified Dim rslt As Long rslt = app.ShowReservationDialog(info) ' Handle the return code ' 1 = OK pressed ' 2 = Cancel pressed If (rslt &lt;&gt; 2) Then Debug.Print "PG = " &amp; info.pgid Debug.Print "Path = " &amp; info.Path ' path
is Read Only, set to the path of the XPF file after the
reservation is created Debug.Print "Field1 = " &amp; info.field1 Debug.Print "Field2 = " &amp; info.field2 Debug.Print "Field3 = " &amp; info.field3 Debug.Print "Field4 = " &amp; info.field4 Debug.Print "Field5 = " &amp; info.field5 Debug.Print "Field6 = " &amp; info.field6 Debug.Print "Field7 = " &amp; info.field7 Debug.Print "Description = " &amp; info.Description Else Debug.Print "Canceled" End If End Sub

Share:


Subscribe to The Efficiency Beat

Author

Kevin Day

Kevin Day

As Trumpet's CEO, Kevin excels at creating barely contained chaos. Kevin's specialty is thinking about things sideways, and coming up with non-obvious, yet beautiful solutions to challenges. When he's not busy helping the Trumpet team innovate, Kevin enjoys taking long (really long) mountain bike rides and playing basketball with his family. He's also crazy tall. And has no hair.