MDL functions typically return domain specific error codes. If the domain is typically a MicroStation (programming) ecosystem/subsystem then error codes (historically) will be negative values defined in our API headers (e.g. see mdlerrs.h), or in MicroStation CONNECT more commonly specific values for a given data type defined in an enumeration.
If a Bentley API works on behalf of another domain (database, network, operating system, Microsoft or 3rd party API, etc.) then the result value returned; if not an existing and descriptive MDL error code in our headers; will often be from the ecosystem passed directly through the calling MDL API. This typically helps developers troubleshooting what may have occurred in the underlying foreign system/API. The MDL documentation (MDLAPIFunctionReference.chm) states (and I confirmed): mdlExternal_wait - always return SUCCESS.
As with some other threads on the Bentley Communities our recommendations are to leverage either:
- MicroStation key-ins (Utilities > Keyin: "!", "$", "%", "%%") which allow you to start external processes (waiting or allowing MicroStation to immediately resume) and pass "expanded" MicroStation configuration variable values to the OS or external applications started.
- If the provided key-ins are not desired and a programming solution needed we recommend to consider using Microsoft APIs (ShellExecute, CreateProcess, etc.) to replace calls to the mdlExternal (legacy) API calls.
if the recommendations above still do not seem to provide a good fit, please provide some more information about your workflow, type of work the external application is doing, why MicroStation may need to be in a locked state until complete, and what MicroStation's next task is after returning from calling your external app. This should provide us a good context of the problem you might be trying to solve and if there are any better options that can be recommended.
HTH,
Bob
↧
RE: [V8i MDL] mdlExternal_wait freezes MicroStation
↧