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

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

ProWorkspaceRegister() returning PRO_TK_BAD_INPUTS

pwilliams-3
12-Amethyst

ProWorkspaceRegister() returning PRO_TK_BAD_INPUTS

Hi All,
I have a rather simple question (in my mind). I have written many
asynchronous Pro/TOOLKIT programs that register a Pro/INTRALINK 3.x
workspace but for some reason it is not working. I am on WF 4.0 M130 and
Pro/I 3.4 M062 and I keep getting PRO_TK_BAD_INPUTS for
ProWorkspaceRegister(). The workspace is in c:\temp and is named
"Workspace". Any ideas? Here is some sample code that also fails.

int main(int argc, char *argv[]) {

ProError pro_error = PRO_TK_NO_ERROR;
ProName pro_wszWsName;

_putenv(
"PRO_COMM_MSG_EXE=C:\PTC\proeWildfire4.0\i486_nt\obj\pro_comm_msg.exe"
);
_putenv("PDM_LDB_PATH=\"C:\Temp\");

pro_error = ProEngineerStart(
"C:\PTC\proeWildfire4.0\bin\proe3.bat", NULL);

ProStringToWstring(pro_wszWsName, "Workspace");
pro_error = ProWorkspaceRegister(pro_wszWsName);

pro_error = ProEngineerEnd();

return 0;
}

Patrick Williams
Sr. Systems Engineer II
Mechanical Engineering Solutions
Missile Systems
Raytheon Company

+1 520.545.6995 (business)
+1 520.545.6399 (fax)
-

TU/M12/8
6221 S Palo Verde Rd
Tucson, AZ 85706 USA
www.raytheon.com



This message contains information that may be confidential and privileged.
Unless you are the addressee (or authorized to receive mail for the
addressee), you should not use, copy or disclose to anyone this message or
any information contained in this message. If you have received this
message in error, please so advise the sender by reply e-mail and delete
this message. Thank you for your cooperation.

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.
3 REPLIES 3
msteffke
14-Alexandrite
(To:pwilliams-3)

I know I've had that before, can't be sure what the exact solutions is,
but here's my top three. Make sure your pdm_lbd_path is set. Also
the ws name is case sensitive, so make sure it matches.
Seems like once I re-re-ran ptcsetup and made sure to set the
interoperability to use intralink.


Mark Steffke
Engineering System Administrator
The Delfield Company
Manitowoc Foodservice
T 989.775.9215
Integrity, Commitment to Stakeholders, and Passion for Excellence

Patrick -

Since you didn't specify a "no graphics" option for Pro/Engineer, I
assume that you confirmed Pro/E actually launched Smiley Wink.

Did you intend to put two pairs of quotes in this statement?

_putenv("PDM_LDB_PATH=\"C:\Temp\");

Have the quotes embedded in the variable value may confuse Pro/E and/or
Intralink.

I'm actually surprised that you only needed two enviroment variables
to launch Pro/E. I actually set others, though many are probably
obsolete.

Also, I included a config.pro file with the setting "dm_remember_server no
".
|+| M a r k |+|

Mark Stallard
Engineering Information Management
Integrated Solutions & Development
Integrated Defense Systems
Raytheon Company



(business)
+1.978.436.6016
(cell)
+1.617.331.5443
(tie line)
239.6016
-

880 Technology Drive
Billerica, MA 01821
www.raytheon.com


This message contains information that may be confidential and privileged.
Unless you are the addressee (or authorized to receive mail for the
addressee), you should not use, copy or disclose to anyone this message or
any information contained in this message. If you have received this
message in error, please so advise the sender by reply e-mail and delete
this message. Thank you for your cooperation.





It was the double quotes plus the length of the workspace name. In my
production code I had workspace names like <name>_<branch>_<rev>_<ver> and
some of them exceeded 32 characters which is the length of a ProName. The
following code works:

int main(int argc, char *argv[]) {

ProError pro_error = PRO_TK_NO_ERROR;
ProName pro_wszWsName;

_putenv(
"PRO_COMM_MSG_EXE=C:\PTC\proeWildfire4.0\i486_nt\obj\pro_comm_msg.exe"
);
_putenv("PDM_LDB_PATH=C:\TEMP");

pro_error = ProEngineerStart(
"C:\PTC\proeWildfire4.0\bin\proe3.bat", NULL);

//pro_error = ProNativestringToWstring(pro_wszWsName,
_countof(pro_wszWsName), "Workspace", PRO_VALUE_UNUSED);
ProStringToWstring(pro_wszWsName, "Workspace");

pro_error = ProWorkspaceRegister(pro_wszWsName);

pro_error = ProEngineerEnd();

return 0;
}

Patrick Williams
Sr. Systems Engineer II
Mechanical Engineering Solutions
Missile Systems
Raytheon Company

+1 520.545.6995 (business)
+1 520.545.6399 (fax)
-

TU/M12/8
6221 S Palo Verde Rd
Tucson, AZ 85706 USA
www.raytheon.com



This message contains information that may be confidential and privileged.
Unless you are the addressee (or authorized to receive mail for the
addressee), you should not use, copy or disclose to anyone this message or
any information contained in this message. If you have received this
message in error, please so advise the sender by reply e-mail and delete
this message. Thank you for your cooperation.



Announcements


Top Tags