I am trying to write a VBS/VBA script in powerpoint which will get some information from a running JMP session.
Here is the basic code.
Sub test()
Dim myjmp As JMP.Application
Set myjmp = CreateObject("JMP.Application")
myjmp.Visible = True
'some code to test running jsl
myjmp.RunCommand ("transfer_data = 35;")
areaHeight = myjmp.GetJSLValue("transfer_data")
End Sub
If the user has a jmp session open that was started by using the start menu or desktop icon, the JMP session will stay open after the script runs. If the user started JMP by double clicking on a .jmp file the JMP session will close after the script finishes even though there is no myjmp.quit call in there.
How do I make the JMP session stay open in both cases?
Other Notes:
Other applications tend to have something like app.usercontrol = true or you can use set myapp = GetObject(,"application") to get an object of the open session. (GetObject(,"JMP.Application") does not work for JMP11)
This doesn't seem to do anything
myjmp.EnableInteractiveMode True
If I create an empty data table, then after the script finishes the jmp session will stay open.
Set dt = myjmp.NewDataTable("")
JMP11.2.1 and Windows 7.