Hi,
I got following error message from Um "message box":
----------------------------------------
1 Symbol not published: type='Text' id=231000006 label="Rotatation Angle:" 2 accessStr="gImportSettingsInfo.RotationAngle"
--------------------------------------
how can I correct these errors?
Thanks.
Unknown said:mdlDialog_publishComplexVariable(setP, "importSettingsInfo", "gImportSettingsInfo", &gImportSettingsInfo);
Do you have a type whose tag is importSettingsInfo? Everything in C/C++ is case-sensitive!
Unknown said:typedef struct importsettingsinfo { ...... } TImportSettingsInfo;
Regards, Jon Summers LA Solutions
Answer Verified By: Zhen Li
Unknown said:$(o)$(appName)typ.rsc : $(o)$(appName)typ.r
You've correctly added the instruction to bmake to create a binary type resource file from your $(appName)typ.r source.
Unknown said:appRscs = $(rscObjects)$(appName).rsc \ $(rscObjects)$(sAppName)cmd.rsc\ $(rscObjects)$(sAppName)msg.rsc
However, you have not included that type resource file in your app. resources...
appRscs = $(rscObjects)$(appName).rsc \ $(rscObjects)$(sAppName)cmd.rsc \ $(rscObjects)$(sAppName)msg.rsc \ $(o)$(sAppName)type.rsc
Without that type resource data, the dialog manager can't figure out what your access string means.
Hi Jon, Thank you so much for your reply. I did as you said. I still get same errors. I did following: ====================== MKE file ========================== privateInc = $(baseDir) langSpec = $(baseDir)transkit/ appRscs = $(rscObjects)$(appName).rsc \ $(rscObjects)$(sAppName)cmd.rsc\ $(rscObjects)$(sAppName)msg.rsc #---------------------------------------------------------------------- # Create needed output directories in case they don't exist #---------------------------------------------------------------------- always: !~@mkdir $(o) !~@mkdir $(rscObjects) !~@mkdir $(reqdObjs) #----------------------------------------------------------------------- # Generate non-language resource files #----------------------------------------------------------------------- $(o)$(appName)typ.r : $(baseDir)$(appName).mt $(o)$(appName)typ.rsc : $(o)$(appName)typ.r $(genSrc)$(sAppName)cmd.h : $(baseDir)$(sAppName)cmd.r $(rscObjects)$(sAppName)cmd.rsc : $(baseDir)$(sAppName)cmd.r $(rscObjects)$(sAppName)msg.rsc : $(baseDir)$(sAppName)msg.r $(rscObjects)$(appName).rsc : $(baseDir)$(appName).r dlmObjs = $(o)$(appName)$(oext) \ $(o)$(cppName)$(oext) DLM_NAME = $(appName) DLM_DEST = $(mdlapps) DLM_OBJECT_FILES = $(dlmObjs) DLM_OBJECT_DEST = $(o) DLM_SPECIAL_LINKOPT = -fixed:no # Notify linker this library does not require a fixed base address to load DLM_NO_DLS = 1 # USE DLLEXPORT IN .CPP DLM_NO_DEF = 1 DLM_NOENTRY = 1 DLM_NO_MANIFEST = 1 # If not set linker embeds your current (developer) patched MSVCRT version manifest in output dll. This is not desirable and produces side-by-side CLIENT ERROR: 14001) DLM_NO_SIGN = 1 # If not set and no certificate found, ERROR: 'singleton' is not recognized as an internal or external command ....... %include $(MDLMKI)dlmlink.mki $(reqdObjs)$(appName).mi : $(appRscs) $(msg) >$(o)make.opt -o$@ $(appRscs) < $(RLibCmd) @$(o)make.opt ~time #---------------------------------------------------------------------- # copy the transkit resource to the transkit directory #---------------------------------------------------------------------- TRANSKIT_RSCS = $(baseDir)$(sAppName)rsc.mki TRANSKIT_INCLUDE = $(privateInc)$(appName).h TRANSKIT_LANG = $(langSpec)*.* %include $(baseDir)$(appName)rsc.mki ====================CODE============================ extern "C" DLLEXPORT void MdlMain(int argc, WCharCP argv[]) { SymbolSet *setP; RscFileHandle rfHandle; char VarValueStr[256]; char* filename = NULL; mdlResource_openFile(&rfHandle, NULL, RSC_READONLY); mdlSystem_registerCommandNumbers(cmdNumbers); /* Load our command table */ if (NULL == mdlParse_loadCommandTable(NULL)) mdlOutput_rscPrintf(MSG_ERROR, NULL, STRINGID_SignCADMessages, MSGID_ErrorLoadingCmdTable); setP = mdlCExpression_initializeSet(VISIBILITY_DIALOG_BOX, 0, FALSE); //mdlDialog_publishStructure(setP, "importSettingsInfo"); mdlDialog_publishComplexVariable(setP, "importSettingsInfo", "gImportSettingsInfo", &gImportSettingsInfo); //mdlDialog_publishComplexVariable(setP, "TFontDialogInfo", "FontDialogInfo", &FontDialogInfo); =====================Definition=========================== typedef struct importsettingsinfo { ...... } TImportSettingsInfo;
TImportSettingsInfo gImportSettingsInfo;TFontDialogInfo FontDialogInfo;
=========================R file======================= DItem_TextRsc TEXTID_Rotate = { NOCMD, LCMD, NOSYNONYM, NOHELP, LHELP, NOHOOK, NOARG, 10, "%0.0f", "%f", "", "", NOMASK, TEXT_NOCONCAT, TXT_DTXT_ROTATE, "gImportSettingsInfo.RotationAngle" }; ================================================ I really can not locate the problems. I need your help to take a look what is wrong with my code. Best,
MicroStation's dialog manager is responsible for handling data exchange between your program variables and dialog items.
You assign an access string to each dialog item that is intended to communicate with your program variable. That access string is specified in your dialog resource source (*.r) file. In your example, you have assigned access string gImportSettingsInfo.RotationAngle to a text item.
In addition to those resource data, you must also publish your variable so that the dialog manager is aware of it. Use mdlDialog_publishComplexVariable(). Look in the delivered examples to find usage of the mdlDialog_publishXxx functions. It's usual to publish your variables when your program loads, probably in MdlMain().
In addition you must inform the dialog manager about the detail of your complex variable gImportSettingsInfo. You do that by adding a type resource file (*.mt) to your project. A type resource file usually contains nothing more than some #includes and a publishStructures (variable) statement. Look in the \DialogBoxes\BasicDialogBox project.