Hi All,
In V8i there was the CMDSTR macro defined to associate a command message with your command in the command table resource.
You can find a usage example below:
CommandTable CT_KIJELOLES = { { 1, CT_NONE, INPUT, CMDSTR(MSGCMD_KIJELOLES_FIX) , "FIX" }, { 2, CT_NONE, INPUT, CMDSTR(MSGCMD_KIJELOLES_VALT), "VALT" }, { 3, CT_NONE, INPUT, CMDSTR(MSGCMD_KIJELOLES_SAV) , "SAV" }, { 10, CT_NONE, INPUT, NONE, "TOROL" }, };
The CMDSTR macro received a message number defined this way:
#define MSGCMD_KIJELOLES_FIX 10 #define MSGCMD_KIJELOLES_VALT 11 #define MSGCMD_KIJELOLES_SAV 12
And the message was defined in the project *_msg.r message resource this way:
MessageList MESSAGELISTID_Commands = { { {MSGCMD_SELECTVIEW ,"Válassza ki az ablakot!" }, {MSGCMD_SELECTFIRSTPOINT ,"Adja meg az első pontot!" }, {MSGCMD_SELECTSECONDPOINT ,"Adja meg a második pontot!" }, {MSGCMD_SELECTTHIRDPOINT ,"Adja meg a harmadik pontot!"}, /* ............................................................................ */ {MSGCMD_KIJELOLES_FIX ,"Kijelölés, papír méret" }, {MSGCMD_KIJELOLES_VALT ,"Kijelölés, változó méret" }, {MSGCMD_KIJELOLES_SAV ,"Kijelölés, sávtérkép" }, } };
My problem is that in the CONNECT EDITION SDK I can not find the CMDSTR macro.
How to migrate the above code to CE?
Thanks in advance.
Br,
Miklos
Miklos Bodi said:How to migrate the above code to CE?
With MicroStation CONNECT the CommandTable struct has changed. The command string ID is specified in its own field. Take a look at the delivered example ModifyTextTool...
CommandTable CT_MAIN = { { 1, CT_NONE, MANIPULATION, NONE, "CHANGECASE", CMDNAME_ChangeCaseMdl }, };
In ModifyTextToolMsg.r...
ModifyTextToolMsg.r
MessageList STRINGLISTID_ChangeCaseCommandNames = { { { CMDNAME_ChangeCaseMdl, "Change Case Example" }, } };
Regards, Jon Summers LA Solutions
Answer Verified By: Miklos Bodi
Hi Jon,
Thanks very much!
What help file is this located in please?
Hi Steven,
Jon quoted from an example program. You can find it in the Microstation SDK.
<MicroStationSDK install path>\examples\Annotations\ModifyTextTool\
You can find the above code in the resource files.
thank you! will check that out
well i can get the code but still looking for the help file that it comes from...
Steven Watson said:still looking for the help file that it comes from
Resource command tables are part of a C++ MicroStationAPI application. MicroStationAPI.chm, installed with the SDK, is the only help file.
MicroStationAPI.chm
Much of the help system is terse, more of a dictionary than explanatory. The best approach is to examine the C++ examples, and learn how their command tables are structured.