Hi
Application.name just tells me that ustation is the running program, but how do my opening VBA detects that Bentley Map for MicroStation is loaded on top
TIA
Erik Wirring
Hi Erik,
I have not tried it, but you can check if BENTLEY_MAP configuration variable is defined. It is one of the basic BM variables, so if it is defined, there is a high probability BM workspace was used and BM is loaded.
More complex solution is to call MicroStation system function (e.g. mdlSystem_getMdlTaskList) and check, if MDL application with TaskID "BENTLEYMAP" is loaded.
HTH Jan
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
You might want to check for the existance of the BENTLEY_MAP configuration variable. This is defined in the msgeo.cfg file at the top and most other configuation setups depend upon it's existance.
For example in the Map Entrprise msgeo.cfg file:
#----------------------------------------------------------------------------------------
#
# $RCSfile: msgeo.cfg,v $
# $Revision: 1.68.2.6 $
# $Date: 2010/12/02 15:39:57 $
# $Copyright: (c) 2010 Bentley Systems, Incorporated. All rights reserved. $
#========================================================================================
# >>>>> WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING <<<<<
# This file should never be changed by users! Any changes to the configuration
# should be made in one of the files included by this file.
%if $(_USTN_PRODUCT_SHORTNAME) == "MapEnterprise"
BENTLEY_MAP = 1
_USTN_USERNAME = msgeo
%else
%error Invalid PowerProduct parameters
%endif
Unknown said:Call MicroStation system function (e.g. mdlSystem_getMdlTaskList) and check, if MDL application with TaskID "BENTLEYMAP" is loaded
Here's an article that describes that solution
Regards, Jon Summers LA Solutions