vskrachkov / py-creoson-client

Python client for creoson library (http://www.creoson.com)
2 stars 1 forks source link

client.start_creo() #1

Open DieSwartKat opened 5 years ago

DieSwartKat commented 5 years ago

Thanks for this link between python and CREOSON.

I'm trying to use it to start CREO (on windows). I have several questions.

  1. The environment variables I've set. Do I put a single "\" or double "\"?
  2. When I set the 'PY_CREOSON_STARTFILE' variable to something other than the default it returns an error message. 'message': "You may only specify 'nitro_proeremote.bat' for the startCommand parameter"
  3. I've set the variable to nitro_proe_remote.bat but CREO doesn't start. CREO does start if I run the nitro_proe_remote.bat from C:\Program Files\PTC manually. I am getting a "CREO is started" returned. Any ideas as to what I can be doing wrong?

I'm printing client._configs to see if the environment variables are reading properly. I found I have the restart the IDLE every time I make a change to them.

Any help will be greatly appreciated, and thanks again for all the effort in putting this library together.

Martin

results: api url:http://localhost:9056/creoson self:{'API_URL': 'http://localhost:9056/creoson', 'START_DIR': 'C:\Program Files\PTC\', 'START_FILE_NAME': 'nitro_proe_remote.bat', 'CONNECTING_RETRIES': '0', 'WORK_DIR': 'C:\PTC\Bar_Start_Creo\'} getting session id ... session id:{8786336518733812516} check that creo is running ... is creo running:False creo is started

vskrachkov commented 5 years ago
  1. Do you mean backslash symbol escape? If yes, go by this link https://stackoverflow.com/questions/19095796/how-to-print-backslash-with-python;
  2. 'nitro_proe_remote.bat' is the only valid value for this parameter for now, see creoson documentation (http://www.creoson.com/functions.html, choose 'connection: start_creo')
  3. This library is just a http client to creoson server. So the creoson server must be running by you at first for possibility to execute python client commands. Please, watch this video https://youtu.be/-M4uzoCJYEg it describes how to start creoson. And only after that you can connect the python client to creoson and execute commands. Also, PY_CREOSON_START_DIR variable must contains a path to the directory where 'nitro_proe_remote.bat is situated.

I didn't any stuff for this library for a 2 years, my machine is not even installed Windows now. I didn't have any plans to maintain this library :) But fill free to ask more questions I try to help you where I can.