Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Starting creoson when Creo starts causing "run file 'creoson_run.bat' does not exist" #60

Closed
stekicar opened this issue Jan 30, 2021 · 24 comments

Comments

@stekicar
Copy link

stekicar commented Jan 30, 2021

I have placed CreosonSetup.exe with its full path into parametric.psf as:

RUN="C:\CreosonServerWithSetup-2.7.0-win64\CreosonSetup.exe"

Creoson starts with Creo but when I click "Start Creoson"button, error "run file 'creoson_run.bat' does not exist" shows up. creoson_run.bat does exist in folder.

If I start Creoson server manually everything works just fine.

What should I do to start Creoson server correctly?

@adama2000
Copy link
Contributor

adama2000 commented Jan 31, 2021 via email

@stekicar
Copy link
Author

Thank you for reply.
I made new bat file in CreosonServerWithSetup-2.7.0-win64 folder - start_creoson_with_creo.bat:

@echo off
cls
taskkill /IM CreosonSetup.exe /F
pushd C:\0_CREO_CONFIGURATION_FILES_OLD\CREO_PYTHON\CreosonServerWithSetup-2.7.0-win64
START C:\0_CREO_CONFIGURATION_FILES_OLD\CREO_PYTHON\CreosonServerWithSetup-2.7.0-win64\CreosonSetup.exe
exit

And added this line to the end in parametric.psf:

RUN="C:\CreosonServerWithSetup-2.7.0-win64\start_creoson_with_creo.bat"

And it works like charm!

Thank you!

@Zepmanbc
Copy link

Zepmanbc commented Feb 2, 2021

If you don't need the JS API and the doc, you can launch only Creoson with creoson_run.bat in the Creoson folder
(you need to run CreosonSetup.exe 1 time to create the config files)

@adama2000
Copy link
Contributor

adama2000 commented Feb 2, 2021 via email

@stekicar
Copy link
Author

stekicar commented Feb 2, 2021

Is it possible to start creoson without pressing start button?

@adama2000
Copy link
Contributor

adama2000 commented Feb 2, 2021 via email

@adama2000
Copy link
Contributor

Note that like CreosonSetup.exe, creoson_run.bat also has to be run from its install directory.

@stekicar
Copy link
Author

stekicar commented Feb 2, 2021

Ok. Got it.

@stekicar
Copy link
Author

stekicar commented Feb 2, 2021

I just tried to run creoson_run.bat. DOS window pops up and message says "connecting to server, port 9056" and it just sits there. No connection to server is made.

@tliebenow
Copy link

tliebenow commented Feb 3, 2021 via email

@stekicar
Copy link
Author

stekicar commented Feb 3, 2021

I am getting this message when I try to connect to creoson:
image

@stekicar
Copy link
Author

stekicar commented Feb 3, 2021

If I run by pressing open button, it works just fine.

@adama2000
Copy link
Contributor

adama2000 commented Feb 3, 2021 via email

@stekicar
Copy link
Author

stekicar commented Feb 3, 2021

I start creoson with "start_creoson_with_creo.bat" so Creo is running. If I change my bat to "START C:\0_CREO_CONFIGURATION_FILES_OLD\CREO_PYTHON\CreosonServerWithSetup-2.7.0-win64\CreosonSetup.exe" everything works without problem.

@adama2000
Copy link
Contributor

I'll admit I've never used the RUN option in a .psf file. If you comment that line out and just run your "start_creoson_with_creo.bat" from the command line, does it work then or not?

@stekicar
Copy link
Author

stekicar commented Feb 3, 2021

I just tested it. It works ok when run from creoson_run.bat without running it in psf.

@adama2000
Copy link
Contributor

adama2000 commented Feb 3, 2021 via email

@stekicar
Copy link
Author

stekicar commented Feb 3, 2021

But that would also be the case when I run creoson.exe from .psf (actually, I start .bat in .pfs file that then starts creoson). And everything is fine. Issue is only when I start creoson thru creoson_run.bat thru my .bat file.

@stekicar
Copy link
Author

stekicar commented Feb 3, 2021

I'll try placing sleep 10 second before I run creoson in my .bat file.

@stekicar
Copy link
Author

stekicar commented Feb 3, 2021

I put 15 seconds sleep and this is what I get:
image
setvars.bat is present in folder.

@stekicar
Copy link
Author

stekicar commented Feb 3, 2021

setvar.bat:

set PROE_COMMON=C:\Program Files\PTC\Creo 5.0.6.0\Common Files
set PROE_ENV=x86e_win64

set JAVA_HOME=jre
set JSON_PORT=9056

@adama2000
Copy link
Contributor

adama2000 commented Feb 3, 2021 via email

@Zepmanbc
Copy link

Zepmanbc commented Feb 3, 2021

I start creoson from a script, not with Creo because sometimes Creoson crashes and i can detect if Creoson is up or not and if it's down I can reload it in my script

Tips to set Creoson's directory and start Creoson with Python:

os.chdir("Creoson/path")
os.startfile(r"Creoson/path/creoson_run.bat")

@stekicar
Copy link
Author

stekicar commented Feb 3, 2021

Problem solved. I somehow deleted "p" from pushd when I was testing creoson_run.bat.
pushd C:\0_CREO_CONFIGURATION_FILES_OLD\CREO_PYTHON\CreosonServerWithSetup-2.7.0-win64

I am trying to remove any involvement of Creo user around creoson. This is why I want to start it when Creo starts.
But, I will put in code check if creoson is running and to restart it if it's not,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants