Open a .jmp file

This is the place for queries that don't fit in any of the other categories.

Open a .jmp file

Postby sampy » Tue Jul 30, 2013 4:51 am

Hi,
I found an example python code to open an "example.jmp" file using python but i get the following error:

Code:
Code: Select all
# -*- coding: cp1252 -*-
from win32com.client import Dispatch
jmp = Dispatch("JMP.Application")
doc = jmp.OpenDocument("C:/Users/bdourass/Desktop/Python/IvyExmod.jmp")
doc.CreateOneWay
#jmp.RunCommand("Distribution(Continuous Distribution( Column( :weight ), \n\
#Fit Distribution( Normal ) ), \n\
#Nominal Distribution( Column( :age ) ) )")
#jmp.OpenDocument("C:/automarketshare.jmp")
#jmp.RunCommand("Pareto Plot(Variables( Y( :ESOFT_BIN ) ))")


Error:
Code: Select all
Traceback (most recent call last):
  File "C:\Users\bdourass\Desktop\Python\RunJMPusingPython.py", line 3, in <module>
    jmp = Dispatch("JMP.Application")
  File "C:\Python27\lib\site-packages\win32com\client\__init__.py", line 95, in Dispatch
    dispatch, userName = dynamic._GetGoodDispatchAndUserName(dispatch,userName,clsctx)
  File "C:\Python27\lib\site-packages\win32com\client\dynamic.py", line 108, in _GetGoodDispatchAndUserName
    return (_GetGoodDispatch(IDispatch, clsctx), userName)
  File "C:\Python27\lib\site-packages\win32com\client\dynamic.py", line 85, in _GetGoodDispatch
    IDispatch = pythoncom.CoCreateInstance(IDispatch, None, clsctx, pythoncom.IID_IDispatch)
com_error: (-2147221005, 'Invalid class string', None, None)
>>>


All inputs are welcome as I couldn't find enough resources on the web discussing the interaction between python and JMP Pro software
Thanks,
Last edited by micseydel on Tue Jul 30, 2013 5:01 am, edited 1 time in total.
Reason: Added code tags.
sampy
 
Posts: 1
Joined: Tue Jul 30, 2013 3:22 am

Return to General Coding Help

Who is online

Users browsing this forum: Cereal, DrakeMagi and 7 guests