It is possible to set up Bentley Map so that every time a DGN is opened, a connection is established to a graphical source such as Oracle Spatial, SQL Server Spatial, OGC WFS, or Esri File Geodatabase
To do this, first define the named graphical source in your project schema.
For example, the following illustrates a named connection to an Oracle database:
Then select the Macros node of the User Workspace, and add the following configuration variable: MS_GEOINITCMD
Set the value of the variable to execute the following keyin:
GDI CONNECT GRAPHICALSOURCE name=graphicalSourceName user=userName password=password
Save and export your changes. The next time the workspace is run and a file is opened, a live connection to the graphical source will be automatically established. This can be seen by navigating to the Connections tab of the Map Interoperability dialog as shown below.
Notes:
- Ensure there are no spaces before and after the = sign in the keyin.
- The user and password are visible to others.
- For SQL Server and Esri File Geodatabase, the user and password are not required. Simply use: GDI CONNECT GRAPHICALSOURCE