cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

ProEngineerStart fails

hanowski
1-Newbie

ProEngineerStart fails

Pro/Guru's,
As long as my Pro/E Wildfire is running with my assembly loaded, no
problem. I can connect to it and everything is fine. Now I want the
asynchronous program to also start proe and load the assembly.

Normally I start proe from an icon which has this programmed into it:
D:\ent\appl\prod\ptc\proewf\bin\proe.exe
D:\ent\appl\prod\ptc\proewf\bin\proewildfire_tk.psf
(there is a space between the two paths)

In the command ProEngineerStart("proe_path","prodev_text_path")
I used the above for the proe_path parameter but it didn't work.

I thought it might not like that as a startup string, so I created a .bat
file called proe_tk.bat and called the .bat file instead. If I enter
proe_tk at dos prompt, no problem Proe comes up ok so I know .bat file is
good.

I have read all the threads and tried every suggestion. Nothing works.
As usual, PTC doesn't call back, so my only alternative is to ask the
Pro/Gurus again.

This is the command I'm using:
ProError err;
err =
ProEngineerStart("D:\\data\\prowork\\ProToolkit\\ModifyAssyDims2\\Debug\\proe_tk.bat","D:\\ent\\appl\\prod\\ptc\\proewf\\protoolkit\\protk_appls\\pt_userguide\\text");

if (err != PRO_TK_NO_ERROR) {
printf("%s\n","Error trying to connect to Pro/Engineer");
return -1; // failure
}

Nothing happens. I check the task manager but no xtop.exe process starts.
It sits there for about 5 minutes and finally I get the message "Error
trying to connect to Pro/Engineer"

For the proe_path, I have tried everything I could think of and for the
prodev_text_path I have also tried every combination of NULL and "."
Nothing works.

I saw some references in the threads about setting PRO_COMM_MSG_EXE
environment variable but didn's see what to set it to. Here's what it's
currently set to:

PRO_COMM_MSG_EXE D:\ent\appl\prod\ptc\proewf\i486_nt\obj\pro_comm_msg.exe

What have I missed? I give up. Any ideas?
Greg

This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.
1 REPLY 1

Summary: 4 people replied.
One person suggested I look at the examples. I always start at the
examples and only post to the Pro/Gurus if I can't get the examples to
work. Same with threads.
Two people suggested it had something to do with argv parameters passed to
the app. I don't pass any parameters to it. I start up the asynchronous
.exe file by typing it's name at a dos prompt with no parameters.

Many thanks to Alan Hild who had the winning suggestion. Turns out to be
two problems. Pro/Toolkit apparently doesn't like paths. Made it a
single word and then it worked. (Almost). Now it does start wildfire but
doesn't return control to the program immediately on startup. Still sits
around for 5 minutes and finally returns error code of -1,
"PRO_TK_GENERAL_ERROR" (Real helpful PTC)

Here are a few of the many commands I tried:
//err = ProEngineerStart("D:\ent\appl\prod\ptc\proewf\bin\proe.exe
D:\ent\appl\prod\ptc\proewf\bin\proewildfire_tk.psf",NULL);
//err =
ProEngineerStart("D:\\data\\prowork\\ProToolkit\\ModifyAssyDims2\\Debug\\proe_tk","D:\\ent\\appl\\prod\\ptc\\proewf\\protoolkit\\protk_appls\\pt_userguide\\text");

//err =
ProEngineerStart("D:\\data\\prowork\\ProToolkit\\ModifyAssyDims2\\Debug\\proe_tk",NULL);

//err =
ProEngineerStart("D:\\data\\prowork\\ProToolkit\\ModifyAssyDims2\\Debug\\proe_tk",".");

//err =
ProEngineerStart("D:\\data\\prowork\\ProToolkit\\ModifyAssyDims2\\Debug\\proe_tk","bat");

//err =
ProEngineerStart("D:\ent\appl\prod\ptc\proewf\bin\proewildfire_tk.psf",NULL);

//err =
ProEngineerStart("D:\\ent\\appl\\prod\ptc\\proewf\\bin\\proewildfire_tk.psf",".");

//err =
ProEngineerStart("D:\ent\appl\prod\ptc\proewf\bin\proewildfire_tk.psf",".");

//err = ProEngineerStart("proewildfire_tk.psf",".");
//err = ProEngineerStart("proe_tk",".");
err = ProEngineerStart("proewildfire",".");

Only two of them worked:
1) err = ProEngineerStart("proewildfire_tk.psf",".");
2) err = ProEngineerStart("proewildfire",".");

proewildfire.bat is our company's batch program for starting up wildfire
without any Pro/Toolkit access. (Yes you can do a few minimal things in
Pro/Toolkit even if you don't have a license for it)

proewildfire_tk.psf is a PTC Startup File created by our sysadmin which
includes environment variables which are supposed to give access to
licensed parts of the Pro/Toolkit. Apparently it also does something else
that I don't understand. (File types in my Windows Explorer are set to
open .psf files with proe.exe which is why it will work with a single
word.)


1)The following command starts wildfire but then sits around for 5
minutes, eventually returning error code -1. I commented out the return
-1; so it could continue on. It then continues on but fails at
err = ProMdlRetrieve(wname, PRO_MDL_ASSEMBLY, &mdl);

2)The following command starts wildfire and then immediately continues on.
It then also fails at
err = ProMdlRetrieve(wname, PRO_MDL_ASSEMBLY, &mdl);


So why does 1 pause while 2 continues on immediately? Something about
that proewildfire_tk.psf file. Here are it's contents:

// PTC - PSF file: proe
//
PRODUCT=Pro/ENGINEER
DESC=proewidfire_tk
ENV=INTRALINK_DIR=
ENV=ILINK_CMD_NAME=
ENV=INTRALINK_CMD=%INTRALINK_DIR%\bin\%ILINK_CMD_NAME%
ENV=MECH_LP=__MECH_DIR__
ENV=MECH_HOME=%MECH_LP%\%PRO_MACHINE_TYPE%
ENV=PRO_MECH_COMMAND="%PRO_DIRECTORY%\bin\proe.exe"
"%PRO_DIRECTORY%\bin\proewildfire_tk.psf"
ENV=PATH+=%PRO_DIRECTORY%\%PRO_MACHINE_TYPE%\deflib
ENV=PATH-=%PRO_DIRECTORY%\%PRO_MACHINE_TYPE%\lib
ENV=PATH-=%INTRALINK_DIR%\%PRO_MACHINE_TYPE%\illib
ENV=PTCNMSPORT=1239
ENV=NMSD_TIMEOUT=300
ENV=PRO_COMM_MSG_EXE=%PRO_DIRECTORY%\%PRO_MACHINE_TYPE%\obj\pro_comm_msg.exe

ENV=PROE_START=%PRO_DIRECTORY%\bin\proe.exe
ENV=CDRS_DATA=%PRO_DIRECTORY%
ENV=PRO_IMAGE_CONVERTER=%PRO_DIRECTORY%\%PRO_MACHINE_TYPE%\obj\convert_image.exe

ENV=PRO_PHOTORENDER=%PRO_DIRECTORY%\%PRO_MACHINE_TYPE%\obj\PhotoRender.exe
ENV=GALAXYHOME=%PRO_DIRECTORY%\%PRO_MACHINE_TYPE%
ENV=PROGUIDE_DIRECTORY=%PRO_DIRECTORY%\uifdoc
ENV=SPG_DIRECTORY=%PRO_DIRECTORY%
ENV=PRO_USRMAIN=%PRO_DIRECTORY%\usrprog\umain\usrmain.c
ENV=PROTABLE_DIRECTORY=%PRO_DIRECTORY%\protable
ENV=PROTAB=%PRO_DIRECTORY%\%PRO_MACHINE_TYPE%\obj\protab.exe
ENV=ZIP_EXEC=%PRO_DIRECTORY%\%PRO_MACHINE_TYPE%\obj\zip.exe
ENV=CLHOME=%PRO_DIRECTORY%\text\pcldata
ENV=PVIEW_PVEXPORT_HOME=%PRO_DIRECTORY%\apps\prodview
ENV=CV_ENV_HOME=%PRO_DIRECTORY%\%PRO_MACHINE_TYPE%\CV102
ENV=VC_VCONF_START=%PRO_DIRECTORY%\%PRO_MACHINE_TYPE%\obj\ptcvconf.exe
ENV=PTC_D_LICENSE_FILE+="our license server names here"
ENV=PROE_FEATURE_NAME=PROE_1384822 ()
RUN="%PRO_DIRECTORY%\%PRO_MACHINE_TYPE%\nms\nmsd.exe" -noservice -timeout
%NMSD_TIMEOUT% &
RUN="%PRO_DIRECTORY%\%PRO_MACHINE_TYPE%\obj\xtop.exe"
// USER - PSF
// Add User specific environment or run applications below here


A ha! You say (as I did). There is the 5 minute delay.
ENV=NMSD_TIMEOUT=300

So I set it to 60 and re-ran in a new dos window but it still delayed for
5 minutes. Maybe I need to reboot for it to go into effect? Great. I
don't want to waste a half hour to get back to where I'm at.

I also tried commenting out this line:
RUN="%PRO_DIRECTORY%\%PRO_MACHINE_TYPE%\nms\nmsd.exe" -noservice -timeout
%NMSD_TIMEOUT% &
but had no effect

Q1. What the heck is in this file that prevents control from being
returned immediately on Proe startup, and why?

Q2: Why does ProMdlRetrieve fail? I moved the assembly and part to the
executable directory (and renamed them to remove the version number just
in case. It came up ok manually.) so I could test it without a path but
it still failed.

Q3: How do you'all handle paths?
TIA
Greg
Announcements
Attention: Creo 7.0 Customers
Please consider upgrading
End of Life announcement here.