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

Community Tip - You can change your system assigned username to something more personal in your community settings. X

Problems creating a button in the ribbon using toolkit

ptc-4754682
1-Visitor

Problems creating a button in the ribbon using toolkit

Hello everybody!

I'm working with Visual Studio 2010 an can compile my project as a .dll and also debuggin is available. The testproject I have created works, due to the messegabox , which appears when I register the protk.dat.

Now I tried to create a button in the ribbon-menu and therefore I wrote the nesessary commands. Everything works until the command ProCmdDesignate creates an error which is:

 

PRO_TK_MSG_NOT_FOUND - One or more messages was not found in the message file

 

I have studied the other examples and theis .txt-files but anyway, I can not find the error!!!

 

Here is my code:

 

 

Code:
uiCmdCmdIdcmd_id;
ProError status;
ProFileName text_file;
int menuId;


static uiCmdAccessState TestAccessDefault(uiCmdAccessMode access_mode)
{
return (ACCESS_AVAILABLE);
}

extern "C" int user_initialize(int argc, // Number of arguments
char *argv[],// Pro/E arguments
char *proe_vsn,// Pro/E version
char *build,// Pro/E build
wchar_t err_buff[]) // Error buffer
{
ProArrayAlloc (1, sizeof (ProUIMessageButton),
1, (ProArray*)&buttons);

ProStringToWstring (text_file, "text.txt");

status = ProCmdActionAdd("Testfunktion", (uiCmdCmdActFn)Show_MsgBox, uiCmdPrioDefault, TestAccessDefault,
PRO_B_TRUE, PRO_B_TRUE, &cmd_id);

status = ProCmdIconSet(cmd_id, "annotation_round");

status = ProCmdDesignate(cmd_id, "-AAAAAA", "-BBBBB", "CCCCCC", text_file);

return 0;
}


 

And the .txt-file:

Code:

-AAAAAA
AAAAAA
#
#
-BBBBB
BBBBB
#
#
CCCCCC
CCCCCC
#
#

 

I really hope anybody can do help me!!! I appreciate an hints in the right direction to solve my problem!!!

Thanks in advance!

Johannes

 


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.
0 REPLIES 0
Announcements


Top Tags