Hi everybody,
In our applications, we have used this to save a resource file:
mdlResource_closeFile(ggAlmHdlGblSys); ggAlmHdlGblSys = 0; mdlResource_openFile(&ggAlmHdlGblSys, filename, RSC_READWRITE);
It has always worked fine but since Connect Advisor has been installed with MicroStation, the function mdlResource_openFile always return MDLERR_FILEREADONLY
If we uninstall Connect Advisor, everything is ok. Is there any other solution save our resource file?We used to save this resource file to avoid to lost all the modifications we do in this file in case of a bug in our software... may be it's not really necessary?
Regrads
Hervé
Hi Hervé,
as usually: specify MicroStation version exactly, in this case also Advisor version too!
Regards,
Jan
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
I've just installed the latest version for connect advisor : 10.1.0.270 64 bitsAnd we use MicroStation 08.11.09.910
Regards
hervecuzon said:It has always worked fine but since Connect Advisor has been installed with MicroStation, the function mdlResource_openFile always return MDLERR_FILEREADONLY
That implies that, for whatever reason, CONNECT Advisor has locked your resource file. Why would it do that?
CONNECT Advisor is not part of MicroStation, and can be uninstalled.
Regards, Jon Summers LA Solutions
Of course John, it can be uninstalledBut it's is installed automatically when you install Microstation, so on all the Microstation of our customers...
hervecuzon said:we have used this to save a resource file:
Is this your own RSC-file, ore are you trying to wirte to a Bentley RSC-file like the UPF-file?
In this case I would strongly recommend to use only your own RSC-files. There are also other traps when You try to write in Bentley owned RSC-Files, even if it is sometimes shown as possible.
Mit freundlichen Grüßen / Best regards Volker Hüfner
| AB_DATE Engineering Software | ab-date.de |
Hi hervecuzon,
A few suggestions to consider and try.
REFERENCE: MicroStation V8i Examples using RSC_READWRITE
C:\Users\robert.hook\Documents\MDLProjects V8i (SELECTseries 4)>s RSC_READWRITE * resmover\resmover.cpp:483: if ((mdlResource_openFile (rfHandleP, fileNameP, RSC_READWRITE)) smgrapi\smgrapi.mc:267: (readWrite == RSC_READWRITE)) smgrapi\smgrapi.mc:273: if (readWrite == RSC_READWRITE) smgrapi\smgrapi.mc:368: if (smgrapi_openSettingsFile (&rscFh, RSC_READWRITE) != SUCCESS) smgrapi\smgrapi.mc:437: if (smgrapi_openSettingsFile (&rscFh, RSC_READWRITE) != SUCCESS)
HTH,Bob
I think resource closing operation may fail. I tried to suggest you to check return value of mdlResource_closeFile() but it doesn't return any status code.
void mdlResource_closeFile ( RscFileHandle rfHandle );
You may check ggAlmHdlGblSys variable after mdlResource_closeFile().
Kind regards,
Sedat AlisAEC Technology Inc.