Pro/TOOLKIT
| Line 24: | Line 24: | ||
where msg_user.txt has the following: | where msg_user.txt has the following: | ||
(file starts on next line) | (file starts on next line) | ||
| − | USER %0s | + | USER %0s |
| − | %0s | + | %0s |
# | # | ||
# | # | ||
Revision as of 16:03, 12 March 2007
I'm using Pro/ENIGNEER Wildfire 3.
Installation
Pro/TOOLKIT is sold as a component of Pro/ENGINEER. If your license allows, you can install Pro/TOOLKIT along with Pro/ENGINEER. There should be an option during the Define Installation Components section of the install with something like:
API Toolkits—Select this component to optionally install the files necessary to run the Application Program Interface toolkits like Pro/J.Link, Pro/Web.Link, and Pro/TOOLKIT.
Setting Up A Project
I found a tutorial on setting up a visual studio project at [1]. I used Visual Studio .Net 2003 and had no problems.
Hello World
The simplest method for a "HelloWorld" program is likely the following:
ProStringToWstring (UserMsg, "C:\\cygwin\\home\\Admin\\tkTest\\TKTEMPLATE\\msg_user.txt");
ProMessageDisplay (UserMsg, "USER %0s",
"Hello World.");
where msg_user.txt has the following: (file starts on next line) USER %0s %0s
USER -HelloWorld HelloWorld
USER -MainBtn1 -MainBtn1
USER New Button help. New Button help.
USER -Sub1 -Sub1
USER -Sub1Btn1 -Sub1Btn1
USER -Sub1Btn2 -Sub1Btn2
(file ends on previous line)
The path will obviously have to be changed to wherever you keep the file. These message files keep the text that is displayed in Pro/ENGINEER. A typical use will be something like the following:
status = ProMenubarMenuAdd ("HelloWorld", "USER -HelloWorld",
"Utilities", PRO_B_TRUE, UserMsg);
Here, a button will recieve the text defined in the file under "USER -HelloWorld." In the above, this is HelloWorld. However, if the the text file instead had the entry
USER -HelloWorld Export
the button would be named "Export." A quirky feature of these message files is that changes in them will only be recognized once Pro/ENGINEER is closed down and restarted. Merely restarting the auxiliary application or re-registering it is insufficient.